all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 39373@debbugs.gnu.org
Subject: bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding
Date: Sat, 01 Feb 2020 09:48:19 +0200	[thread overview]
Message-ID: <83eevekat8.fsf@gnu.org> (raw)
In-Reply-To: <8EF7D3C6-041D-493F-859B-55D8D35AF588@acm.org> (message from Mattias Engdegård on Fri, 31 Jan 2020 21:51:48 +0100)

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Fri, 31 Jan 2020 21:51:48 +0100
> Cc: 39373@debbugs.gnu.org
> 
> 'add-to-list' doesn't work on lexical variables because it's a plain
> function taking the variable symbol as argument. 'push' works on
> lexical variables since it is a macro that expands to direct
> variable reference and setq.

If that's the case, then why don't we say that loud and clear in the
ELisp manual?  (The doc string of add-to-list has some vague
recommendation, not sure if it really talks about this aspect, but
that's definitely not enough for such a serious issue.)

And doesn't it mean we should audit all the gazillion uses of
add-to-list in our sources, and do that urgently?

> I should perhaps have included this in the commit message.

That would have definitely helped, thanks.

> We could sink the pushes to the leaves of the condition tree, if you prefer:

No, your original patch is fine, but please let's update the docs
ASAP.

Thanks.





  reply	other threads:[~2020-02-01  7:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 17:08 bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding Mattias Engdegård
2020-01-31 19:27 ` Eli Zaretskii
2020-01-31 19:38   ` Mattias Engdegård
2020-01-31 20:25     ` Eli Zaretskii
2020-01-31 20:51       ` Mattias Engdegård
2020-02-01  7:48         ` Eli Zaretskii [this message]
2020-02-01 15:53           ` Drew Adams
2020-02-01 19:24           ` Mattias Engdegård
2020-02-01 19:28             ` Eli Zaretskii
2020-02-01 20:15             ` Stefan Monnier
2020-02-01 21:40               ` Mattias Engdegård
2020-02-02  3:31                 ` Eli Zaretskii
2020-02-02 11:58                   ` Mattias Engdegård
2020-02-02 13:55                     ` Stefan Monnier
2020-02-02 14:14                       ` Mattias Engdegård
2020-08-09 11:39                         ` Lars Ingebrigtsen
2020-08-09 13:28                           ` Mattias Engdegård
2020-08-09 19:42                             ` Lars Ingebrigtsen

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=83eevekat8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39373@debbugs.gnu.org \
    --cc=mattiase@acm.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.