* bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.
@ 2023-02-17 17:08 Alan Mackenzie
2023-02-17 17:37 ` Alan Mackenzie
0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2023-02-17 17:08 UTC (permalink / raw)
To: 61579
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).
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.
2023-02-17 17:08 bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions Alan Mackenzie
@ 2023-02-17 17:37 ` Alan Mackenzie
0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2023-02-17 17:37 UTC (permalink / raw)
To: 61579-done
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).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-17 17:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 17:08 bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions Alan Mackenzie
2023-02-17 17:37 ` Alan Mackenzie
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.