GNU bug report logs -
#61579
master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Fri, 17 Feb 2023 17:10:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 61579 <at> debbugs.gnu.org.
--
61579: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61579
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello, Emacs.
This bug has been fixed in the master branch.
On Fri, Feb 17, 2023 at 17:08:56 +0000, Alan Mackenzie wrote:
> In buffer *scratch*, enter the following:
> (eval-and-compile
> (defvar foo "foo")
> (make-variable-buffer-local 'foo))
> .. With point inside that form, do M-x compile-defun. This causes these
> warnings in *Compile-Log*:
> Buffer *scratch*:4:2: Warning: global/dynamic var `foo' lacks a prefix
> Buffer *scratch*:4:2: Warning: `make-variable-buffer-local' not called at
> toplevel
> .. The position 4:2 is the position of eval-and-compile, not the correct
> positions of the two warning messages. This is a bug.
> [Side note: When eval-and-compile is replaced by eval-when-compile,
> correct warning positions are generated thus:
> Buffer *scratch*:5:11: Warning: global/dynamic var `foo' lacks a prefix
> Buffer *scratch*:6:4: Warning: `make-variable-buffer-local' not called at
> toplevel
> ..]
--
Alan Mackenzie (Nuremberg, Germany).
[Message part 3 (message/rfc822, inline)]
Hello, Emacs.
In buffer *scratch*, enter the following:
(eval-and-compile
(defvar foo "foo")
(make-variable-buffer-local 'foo))
.. With point inside that form, do M-x compile-defun. This causes these
warnings in *Compile-Log*:
Buffer *scratch*:4:2: Warning: global/dynamic var `foo' lacks a prefix
Buffer *scratch*:4:2: Warning: `make-variable-buffer-local' not called at
toplevel
.. The position 4:2 is the position of eval-and-compile, not the correct
positions of the two warning messages. This is a bug.
[Side note: When eval-and-compile is replaced by eval-when-compile,
correct warning positions are generated thus:
Buffer *scratch*:5:11: Warning: global/dynamic var `foo' lacks a prefix
Buffer *scratch*:6:4: Warning: `make-variable-buffer-local' not called at
toplevel
..]
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 2 years and 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.