[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simplifying beginning-of-defun
From: |
Eric M. Ludlam |
Subject: |
Re: simplifying beginning-of-defun |
Date: |
Sun, 27 Sep 2009 07:17:28 -0400 |
On Sun, 2009-09-27 at 12:26 +0200, Andreas Roehler wrote:
> ...
> > any argument. So your code wouldn't be acceptable as is since it would
> > likely break several packages.
> >
>
> ...
>
>
> Hi Stefan,
>
> reflecting this question a little bit further:
>
> as expressive settings of `push-mark' are removed, some functions
> while rely upon and fail then.
>
> However, `push-mark' is a very basic and considerable
> editing command. If a function needs it, it should implement it at place.
>
> Suggest keeping things apart: move functions should
> move, not deliver a hair-cut. :)
>
> If more is needed, another function should take over than.
>
> All-at-once essays create complexity and never ending
> bugs finally.
>
> So far, think simplifying is worthwhile on the longer run.
>
>
> Andreas
I agree with the basic mechanics of what Andreas is providing here, not
any specific feature change involved in the patch. If there were some
function like the -raw functions he proposed that program modes would
use if they wanted exactly that behavior, and a separate interactive
function, then that opens the door for improvements on the interactive
function.
This comes up specifically with CEDET, where I can use parser
information to do a real `beginning-of-defun' for langauges whos defuns
don't happen to start with a ( in the first column. From an interactive
point of view, a total win. From a programs point of view, this would
mean disaster if all their code was expecting the cursor to show up on
some opening {, and not on the text actually starting the defun.
For modes like cc-mode that write their own correct
`beginning-of-defun', they would use that internally anyway, so no loss.
Right now, the feature I describe in CEDET/Semantic is done with advice
and various if statements making sure not to do the modification in
non-interactive cases. The code is in senator.el.
http://cedet.cvs.sourceforge.net/viewvc/cedet/cedet/semantic/senator.el?view=markup
Eric
- simplifying beginning-of-defun, Andreas Roehler, 2009/09/26
- Re: simplifying beginning-of-defun, Stefan Monnier, 2009/09/26
- Re: simplifying beginning-of-defun, Andreas Roehler, 2009/09/27
- Re: simplifying beginning-of-defun, Stefan Monnier, 2009/09/27
- Re: simplifying beginning-of-defun, Andreas Roehler, 2009/09/28
- Re: simplifying beginning-of-defun, Stefan Monnier, 2009/09/28
- Re: simplifying beginning-of-defun, Andreas Roehler, 2009/09/29
- Re: simplifying beginning-of-defun, Andreas Roehler, 2009/09/29
Re: simplifying beginning-of-defun, Andreas Roehler, 2009/09/27
- Re: simplifying beginning-of-defun,
Eric M. Ludlam <=
- Re: simplifying beginning-of-defun, Stefan Monnier, 2009/09/27
- Re: simplifying beginning-of-defun, Eric M. Ludlam, 2009/09/27
- Re: simplifying beginning-of-defun, Stefan Monnier, 2009/09/27
- Re: simplifying beginning-of-defun, Eric M. Ludlam, 2009/09/27
- Re: simplifying beginning-of-defun, Stefan Monnier, 2009/09/28
- Re: simplifying beginning-of-defun, Eric M. Ludlam, 2009/09/28
Re: simplifying beginning-of-defun, Alan Mackenzie, 2009/09/29
Re: simplifying beginning-of-defun, Glenn Morris, 2009/09/27