emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#61579: closed (master branch: Byte compilation: Warning messages ins


From: GNU bug Tracking System
Subject: bug#61579: closed (master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.)
Date: Fri, 17 Feb 2023 17:39:01 +0000

Your message dated Fri, 17 Feb 2023 17:37:55 +0000
with message-id <Y++7cxWnRgu+NKF0@ACM>
and subject line Re: bug#61579: master branch: Byte compilation: Warning 
messages inside eval-and-compile lose their positions.
has caused the debbugs.gnu.org bug report #61579,
regarding master branch: Byte compilation: Warning messages inside 
eval-and-compile lose their positions.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61579: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61579
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions. Date: Fri, 17 Feb 2023 17:08:56 +0000
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).



--- End Message ---
--- Begin Message --- Subject: Re: bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions. Date: Fri, 17 Feb 2023 17:37:55 +0000
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).


--- End Message ---

reply via email to

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