[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fwd: Re: beginning-of-defun]
From: |
Richard Stallman |
Subject: |
Re: [Fwd: Re: beginning-of-defun] |
Date: |
Sun, 16 Jul 2006 02:25:55 -0400 |
Thanks for starting to explore this issue.
Because it only finds `defun' calls, it fails to find other constructs
that define functions or macros. Also, it would get rather confused
when dealing with top-level forms that don't define functions at all:
it just skips them.
The example suggests that this code avoids finding a match inside a
string, but in fact there is no code to check that. It just checks
that the (defun doesn't follow any non-indentation and that it includes
a function name and argument list.
I think it would be more useful to specially recognize certain
top-level combining constructs, such as eval-when-compile and `when',
and treat their subforms as defuns.
;; The mode should set this, if possible
(defcustom beginning-of-function-return-value t
"Specify the return value if function succeeds: either t or the value
of point"
:group 'lisp
:type '(choice (const t)
(sexp :tag "Return function" (point))))
I think that feature is unhelpful complexity. It would be better to
have just one return value convention. If the caller of
beginning-of-function wants the value of point, it can do (if
(beginning-of-function) (point))
- [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/08
- Re: [Fwd: Re: beginning-of-defun], Thien-Thi Nguyen, 2006/07/08
- Re: [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/10
- Re: [Fwd: Re: beginning-of-defun], Thien-Thi Nguyen, 2006/07/10
- Re: [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/10
- Re: [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/14
- Re: [Fwd: Re: beginning-of-defun],
Richard Stallman <=
- Re: [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/16
- Re: [Fwd: Re: beginning-of-defun], Richard Stallman, 2006/07/17
- Re: [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/17
- Re: [Fwd: Re: beginning-of-defun], Thien-Thi Nguyen, 2006/07/17
- Re: [Fwd: Re: beginning-of-defun], Richard Stallman, 2006/07/17
- Re: [Fwd: Re: beginning-of-defun], Andreas Roehler, 2006/07/18