GNU bug report logs - #636
23.0.60; Read syntax error while byte-compiling

Previous Next

Package: emacs;

Reported by: Dmitry Dzhus <dima <at> sphinx.net.ru>

Date: Fri, 1 Aug 2008 07:50:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 636 <at> debbugs.gnu.org, emacs-devel <at> gnu.org,
        Glenn Morris <rgm <at> gnu.org>, Michael Olson <mwolson <at> gnu.org>,
        Alan Mackenzie <acm <at> muc.de>
Subject: bug#636: Please fix before the release of 23.1
Date: Mon, 11 Aug 2008 12:30:04 -0400
Ulrich Mueller <ulm <at> gentoo.org> writes:

>> (defconst foo
>>   (let ((beginning-of-defun-function
>> 	 (lambda (&optional arg)
>> 	   (not (eq arg nil)))))
>>     (progn
>>       (beginning-of-defun 1))))
>
>> (provide 'foo)
>
> Calling beginning-of-defun will move point, right?
>
> And since beginning-of-defun-function is essentially defined as a
> no-op, point will just be moved to the beginning-of-line. (In fact,
> eval-buffer on foo.el results in an infinite loop.)

Aha, I see.

So the question is, should we make the change to cc-defs.el, or (as
suggested by Michael Olson) make the byte-compiler wrap around each
variable definition with `save-excursion'?

Even with the latter solution, incorrectly written elisp in variable
definitions can still create problems.  For example, `save-excursion'
won't save us if the elisp runs `kill-buffer'.

This indicates that we fix cc-defs.el, and leave the rest of Emacs
alone.




This bug report was last modified 15 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.