GNU bug report logs - #61579
master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61579 in the body.
You can then email your comments to 61579 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61579; Package emacs. (Fri, 17 Feb 2023 17:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 17 Feb 2023 17:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
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).




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Fri, 17 Feb 2023 17:39:01 GMT) Full text and rfc822 format available.

Notification sent to Alan Mackenzie <acm <at> muc.de>:
bug acknowledged by developer. (Fri, 17 Feb 2023 17:39:02 GMT) Full text and rfc822 format available.

Message #10 received at 61579-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: 61579-done <at> debbugs.gnu.org
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).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Mar 2023 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.