[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.
- Is add-to-list supposed to work when lexical-binding is t?, Kelly Dean, 2013/06/03
- Re: Is add-to-list supposed to work when lexical-binding is t?, Kelly Dean, 2013/06/05
- Re: Is add-to-list supposed to work when lexical-binding is t?, Kelly Dean, 2013/06/09
- Re: Is add-to-list supposed to work when lexical-binding is t?, Barry Margolin, 2013/06/10
- Re: Is add-to-list supposed to work when lexical-binding is t?, Kelly Dean, 2013/06/11
- Re: Is add-to-list supposed to work when lexical-binding is t?, Stefan Monnier, 2013/06/13