GNU bug report logs - #39373
27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding

Previous Next

Package: emacs;

Reported by: Mattias EngdegÄrd <mattiase <at> acm.org>

Date: Fri, 31 Jan 2020 17:41:03 UTC

Severity: normal

Found in version 27.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: 39373 <at> debbugs.gnu.org
Subject: bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexical-binding
Date: Sat, 1 Feb 2020 07:53:18 -0800 (PST)
> > '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?

+1.  `add-to-list' uses `symbol-value'.  Everything that
uses `symbol-value' is in the same boat.




This bug report was last modified 4 years and 282 days ago.

Previous Next


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