[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-lisp/cl.el (pushnew): void-variable x
From: |
Stefan Monnier |
Subject: |
Re: emacs-lisp/cl.el (pushnew): void-variable x |
Date: |
Tue, 12 Sep 2006 20:23:11 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> Honestly, I think using `add-to-list' here makes no sense. Since we
> have the variable as a symbol and we're macro-expanding, we can just
> use `(unless (member ,element ,var) (setq ,var (cons ,element ,var)))
> That'll be a lot more efficient than going through a function call to
> add-to-list, using an aux-var accessed via symbol-value and set and
> checking `append' arg etc...
> Maybe you're right, but note that it can't actually be `member' in
> this case, not by default, since the default comparison function for
> pushnew is `eql'.
So you agree with me: it makes no sense to use add-to-list since add-to-list
uses `equal'.
Stefan ;-)
- Re: emacs-lisp/cl.el (pushnew): void-variable x, (continued)
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Kim F. Storm, 2006/09/20
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Miles Bader, 2006/09/20
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Kim F. Storm, 2006/09/21
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Miles Bader, 2006/09/21
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Kim F. Storm, 2006/09/21
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Richard Stallman, 2006/09/21
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Kim F. Storm, 2006/09/22
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Miles Bader, 2006/09/22
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Kim F. Storm, 2006/09/22
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Richard Stallman, 2006/09/12
- Re: emacs-lisp/cl.el (pushnew): void-variable x,
Stefan Monnier <=
- Re: emacs-lisp/cl.el (pushnew): void-variable x, Kim F. Storm, 2006/09/13