help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Is add-to-list supposed to work when lexical-binding is t?


From: PJ Weisberg
Subject: Re: Is add-to-list supposed to work when lexical-binding is t?
Date: Tue, 4 Jun 2013 08:24:04 -0700

On Mon, Jun 3, 2013 at 6:49 PM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:

>
> > (let ((x '(a))) (add-to-list 'x 'b) x) -> (b a)
>
> Yup, this is asking for trouble.  Use `push' or `cl-pushnew' instead.
>
>
Unless you're knee-deep in the internals of the language, the difference
between `cl-pushnew' and `add-to-list' is so obscure as to be
incomprehensible.

-PJ

Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.


reply via email to

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