emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Re: beginning-of-defun]


From: Thien-Thi Nguyen
Subject: Re: [Fwd: Re: beginning-of-defun]
Date: 08 Jul 2006 14:42:35 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Andreas Roehler <address@hidden> writes:

> `defun' is a special form with a special meaning in emacs-lisp

yes, but "defun" is also in common parlance a "top-level
form".  these two meanings are congruent but not identical.
you have to sort of alternatively squint and relax your ears
to hear the similarity...
 
> Think it's disturbing to introduce a different meaning
> employing the same name.

you get used to being disturbed w/ a little practice.

> Certainly a function `beginning-of-top-level-form' is
> useful. However, it should be callable separate from
> `beginning-of-defun' and vice versa.

here is a (self-testable in the right context ;-) toy:

(global-set-key 
 "\C-\M-a"
 (defun beginning-of-defun-just-defun-really-i-mean-it! ()
   (interactive)
   (let ((beginning-of-defun-function
          (lambda ()
            (search-backward "(defun" (point-min) t))))
     (beginning-of-defun))))

>  `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.

it works for my understanding of "defun".  more importantly,
my understanding of "defun" is shared by many people, most
of whom are probably uninclined to add something like the
above function to emacs.

thi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]