From: Alan Mackenzie <acm@muc.de>
To: 61579@debbugs.gnu.org
Subject: bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions.
Date: Fri, 17 Feb 2023 17:08:56 +0000 [thread overview]
Message-ID: <Y++0qKoXG5Uc8fOK@ACM> (raw)
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).
next reply other threads:[~2023-02-17 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 17:08 Alan Mackenzie [this message]
2023-02-17 17:37 ` bug#61579: master branch: Byte compilation: Warning messages inside eval-and-compile lose their positions Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y++0qKoXG5Uc8fOK@ACM \
--to=acm@muc.de \
--cc=61579@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).