[Top][All Lists]

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

emacs-lisp-byte-compile and buffer change

From: Lars Hansen
Subject: emacs-lisp-byte-compile and buffer change
Date: Thu, 03 Jun 2004 20:48:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk

Create a file foo.el containing the line

 (setq foo t)

and then do

emacs --no-init-file --no-site-file --file=foo.el --eval="(emacs-lisp-byte-compile)"

The Emacs correctly displays a *Compile-Log* with the message

 foo.el:1:7:Warning: assignment to free variable foo

Now, make a file bar.el with

(setq display-buffer-function
 (lambda (buffer not-this-window)
   (set-buffer buffer)
   (let ((display-buffer-function nil))
     (display-buffer buffer not-this-window))))

and do

emacs --no-init-file --no-site-file --load=bar.el --file=foo.el --eval="(emacs-lisp-byte-compile)"

The Emacs _incorrectly_ displays a *Compile-Log* with the messages

 foo.el:1:7:Warning: assignment to free variable bar
 foo.el:1:3:Error: End of file during parsing

This seems to be because the display-buffer-function above changes the buffer.
Emacs 21.3 does not have this problem.

You may say that the display-buffer-function above should not change the buffer. However, Emacs (however parts it is) should IMHO be more robust here (like 21.3 is).

reply via email to

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