unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 59057@debbugs.gnu.org
Subject: bug#59057: Emacs 29. Byte compiler sometimes forgets about a defvar.
Date: Tue, 08 Nov 2022 09:12:38 -0500	[thread overview]
Message-ID: <jwvpmdxv92h.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <Y2o2/UJeAShsSP+8@ACM> (Alan Mackenzie's message of "Tue, 8 Nov 2022 11:01:17 +0000")

> The recently introduced special handling of defvar without a value is
> not welcome.

`defvar` without a value has been treated specially (more specifically
as a pure compiler-directive with no run-time effect) since at least
Emacs-19.34, so I'm not sure "recently" can be applied here.

> Why should anybody want a dynamic variable later to be
> a lexically scoped variable?.  

E.g. for historical reasons `calendar.el` needs to bind dynamically the
variable `date` around some calls to `eval` and to `run-hooks` because
the code evaluated therein has been defined and documented for may years
before to have access to important info via those dynbound vars.

Yet, we don't want `date` to be globally declared as being
always dynbound just because of that package's mishap, do we?

Similar situations affect other innocent-looking vars in other packages.


        Stefan






  reply	other threads:[~2022-11-08 14:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05 18:46 bug#59057: Emacs 29. Byte compiler sometimes forgets about a defvar Alan Mackenzie
2022-11-07 13:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-07 20:20   ` Alan Mackenzie
2022-11-07 21:29     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-08 11:01       ` Alan Mackenzie
2022-11-08 14:12         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-11-07 21:31     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-09 13:40       ` Alan Mackenzie
2022-11-09 17:54         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-24 19:29           ` Stefan Kangas
2022-11-24 19:33             ` Eli Zaretskii
2022-11-24 20:36             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-24 21:12               ` Stefan Kangas
2022-11-25 10:36                 ` 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=jwvpmdxv92h.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59057@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=monnier@iro.umontreal.ca \
    /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).