--- Begin Message ---
Subject: |
Re: beginning-of-defun |
Date: |
Sat, 08 Jul 2006 17:54:30 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060516) |
Thien-Thi Nguyen schrieb:
Andreas Roehler <address@hidden> writes:
Wrong, as at the start of the enclosing form.
well, "defun" here actually means "top-level form";
the command works w/ all kinds of sexps, whether or not
they are actually `defun's.
`defun' is a special form with a special meaning in emacs-lisp
,----
| 12.4 Defining Functions
| =======================
|
| We usually give a name to a function when it is first created. This is
| called "defining a function", and it is done with the `defun' special
| form.
|
| -- Spezielle Form: defun name argument-list body-forms
| `defun' is the usual way to define new Lisp functions.
`----
Think it's disturbing to introduce a different meaning employing the
same name.
This pertains to the Emacs Manual were is said
,----
| 31.2.2 Moving by Defuns
| -----------------------
|
| These commands move point or set up the region based on top-level major
| definitions, also called "defuns".
`----
A `top-level-form' might be a defun, but is a far more
general terminus with his value at his own AFAIU.
Certainly a function `beginning-of-top-level-form' is
useful. However, it should be callable separate from
`beginning-of-defun' and vice versa.
the way to make the behavior arbitrarily more precise is
to customize `beginning-of-defun-function'. for example,
see `python-beginning-of-defun' in progmodes/python.el.
`beginning-of-defun' should work right out of the
box at least in Emacs Lisp. That's easily to be done -
if the need is recognised so far.
__
Andreas Roehler
--- End Message ---