[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39373: 27.0.50; [PATCH] mode-local-print-bindings broken with lexica

From: Drew Adams
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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]