* Possible emacs bug.
@ 2002-11-20 13:18 Charlie
2002-11-20 13:22 ` Edric M Ellis
0 siblings, 1 reply; 6+ messages in thread
From: Charlie @ 2002-11-20 13:18 UTC (permalink / raw)
I have discovered a "feature" but I strongly suspect I am not the first.
Using emacs 21.2.1 on win32 and the version with debian woody in lisp-mode
the lisp-eval-defun (M-C-x) does not eval the defun if the indenetation is
incorrect. example:
(defun badly-indented ()
(+ 2 3))
=> 5
(defun correctly-indented ()
(+ 2 3))
=> correctly-indented
This works in a number of inferior lisps like clisp and cmucl and in both
normal lisp mode and ilisp.
How can I find out if this has been reported and if not report it?
Cheers
Charlie.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible emacs bug.
2002-11-20 13:18 Charlie
@ 2002-11-20 13:22 ` Edric M Ellis
2002-11-20 13:39 ` Charlie
2002-11-23 20:49 ` Kai Großjohann
0 siblings, 2 replies; 6+ messages in thread
From: Edric M Ellis @ 2002-11-20 13:22 UTC (permalink / raw)
On Wed, 20 Nov 2002, charlieb@zoom.co.uk wrote:
> I have discovered a "feature" but I strongly suspect I am not the
> first. Using emacs 21.2.1 on win32 and the version with debian woody
> in lisp-mode the lisp-eval-defun (M-C-x) does not eval the defun if
> the indenetation is incorrect. [...]
This seems to be because of the way ``beginning-of-defun'' works. It's
looking for a "(" at the start of a line. If you want to force it to
look for "(defun" at the beginning of a line, you could do this:
(setq beginning-of-defun-function (lambda nil
(re-search-backward "^(defun")))
Cheers,
Edric.
--
Edric M Ellis
The MathWorks, Ltd., Matrix House, Cowley Park, Cambridge CB4 0HH, UK
Tel: +44 (0) 1223 423 200 Ext: 218
Fax: +44 (0) 1223 423 255
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible emacs bug.
2002-11-20 13:22 ` Edric M Ellis
@ 2002-11-20 13:39 ` Charlie
2002-11-23 20:49 ` Kai Großjohann
1 sibling, 0 replies; 6+ messages in thread
From: Charlie @ 2002-11-20 13:39 UTC (permalink / raw)
That was easy but I couldn't have figured it out.
Thank-you.
"Edric M Ellis" <eellis@mathworks.co.uk> wrote in message
news:ubs4k8jge.fsf@eellis.mathworks.co.uk...
> This seems to be because of the way ``beginning-of-defun'' works. It's
> looking for a "(" at the start of a line. If you want to force it to
> look for "(defun" at the beginning of a line, you could do this:
>
> (setq beginning-of-defun-function (lambda nil
> (re-search-backward "^(defun")))
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Possible emacs bug.
@ 2002-11-20 16:34 Bingham, Jay
0 siblings, 0 replies; 6+ messages in thread
From: Bingham, Jay @ 2002-11-20 16:34 UTC (permalink / raw)
This "feature" is present in emacs 20.4 running under Unix as well.
-_
J_)
C_)ingham
. HP - NonStop Austin Software & Services - Software Quality Assurance
. Austin, TX
. Language is the apparel in which your thoughts parade in public.
. Never clothe them in vulgar and shoddy attire. -Dr. George W. Crane-
-----Original Message-----
From: Charlie [mailto:charlieb@zoom.co.uk]
Sent: Wednesday, November 20, 2002 7:19 AM
To: help-gnu-emacs@gnu.org
Subject: Possible emacs bug.
I have discovered a "feature" but I strongly suspect I am not the first.
Using emacs 21.2.1 on win32 and the version with debian woody in lisp-mode
the lisp-eval-defun (M-C-x) does not eval the defun if the indenetation is
incorrect. example:
(defun badly-indented ()
(+ 2 3))
=> 5
(defun correctly-indented ()
(+ 2 3))
=> correctly-indented
This works in a number of inferior lisps like clisp and cmucl and in both
normal lisp mode and ilisp.
How can I find out if this has been reported and if not report it?
Cheers
Charlie.
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible emacs bug.
2002-11-20 13:22 ` Edric M Ellis
2002-11-20 13:39 ` Charlie
@ 2002-11-23 20:49 ` Kai Großjohann
2002-11-25 19:16 ` Barry Margolin
1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2002-11-23 20:49 UTC (permalink / raw)
Edric M Ellis <eellis@mathworks.co.uk> writes:
> This seems to be because of the way ``beginning-of-defun'' works.
Whee. I think it's fine that beginning-of-defun takes some shortcuts
for indentation and movement, but maybe C-M-x should produce a more
correct result? OTOH, then it might take very long for C-M-x to do
its thing.
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible emacs bug.
2002-11-23 20:49 ` Kai Großjohann
@ 2002-11-25 19:16 ` Barry Margolin
0 siblings, 0 replies; 6+ messages in thread
From: Barry Margolin @ 2002-11-25 19:16 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
In article <84k7j4au5k.fsf@lucy.cs.uni-dortmund.de>,
Kai Großjohann <kai.grossjohann@uni-duisburg.de> wrote:
>Edric M Ellis <eellis@mathworks.co.uk> writes:
>
>> This seems to be because of the way ``beginning-of-defun'' works.
>
>Whee. I think it's fine that beginning-of-defun takes some shortcuts
>for indentation and movement, but maybe C-M-x should produce a more
>correct result? OTOH, then it might take very long for C-M-x to do
>its thing.
All the commands that operate on on a "defun" use the same definition of
what a function definition is. This is good for consistency, and also for
performance.
--
Barry Margolin, barmar@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-11-25 19:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20 16:34 Possible emacs bug Bingham, Jay
-- strict thread matches above, loose matches on Subject: below --
2002-11-20 13:18 Charlie
2002-11-20 13:22 ` Edric M Ellis
2002-11-20 13:39 ` Charlie
2002-11-23 20:49 ` Kai Großjohann
2002-11-25 19:16 ` Barry Margolin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).