all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: PJ Weisberg <pj@irregularexpressions.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Is add-to-list supposed to work when lexical-binding is t?
Date: Tue, 4 Jun 2013 08:24:04 -0700	[thread overview]
Message-ID: <CAJsNXT=da5V5OTAAfyPEuR9aDoNs+Y4gmfb1SZjcFYBxyFBF-A@mail.gmail.com> (raw)
In-Reply-To: <jwvr4giwt3x.fsf-monnier+gmane.emacs.help@gnu.org>

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	other threads:[~2013-06-04 15:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04  0:42 Is add-to-list supposed to work when lexical-binding is t? Kelly Dean
2013-06-04  1:49 ` Stefan Monnier
2013-06-04 15:24   ` PJ Weisberg [this message]
2013-06-05  2:41     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2013-06-05 23:12 Kelly Dean
2013-06-06  0:42 ` Stefan Monnier
2013-06-10  1:43 Kelly Dean
2013-06-10  7:56 ` Stefan Monnier
     [not found] <mailman.1311.1370828650.22516.help-gnu-emacs@gnu.org>
2013-06-10  5:12 ` Barry Margolin
2013-06-12  0:59 Kelly Dean
     [not found] <mailman.1450.1370998793.22516.help-gnu-emacs@gnu.org>
2013-06-13 14:57 ` Stefan Monnier

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='CAJsNXT=da5V5OTAAfyPEuR9aDoNs+Y4gmfb1SZjcFYBxyFBF-A@mail.gmail.com' \
    --to=pj@irregularexpressions.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.