[Top][All Lists]

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

bug#636: Please fix before the release of 23.1

From: Chong Yidong
Subject: bug#636: Please fix before the release of 23.1
Date: Mon, 11 Aug 2008 12:30:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Ulrich Mueller <address@hidden> 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

reply via email to

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