all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: 61579-done@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:37:55 +0000	[thread overview]
Message-ID: <Y++7cxWnRgu+NKF0@ACM> (raw)
In-Reply-To: <Y++0qKoXG5Uc8fOK@ACM>

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).





      reply	other threads:[~2023-02-17 17:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y++7cxWnRgu+NKF0@ACM \
    --to=acm@muc.de \
    --cc=61579-done@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 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.