mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
(pushnew-internal): Remove defvar.
(pushnew): Fix last change.
This commit is contained in:
parent
73812be664
commit
fcecceea0f
1 changed files with 2 additions and 3 deletions
|
|
@ -149,8 +149,6 @@ be a symbol, or any generalized variable allowed by `setf'."
|
||||||
(if (symbolp place) (list 'setq place (list 'cons x place))
|
(if (symbolp place) (list 'setq place (list 'cons x place))
|
||||||
(list 'callf2 'cons x place)))
|
(list 'callf2 'cons x place)))
|
||||||
|
|
||||||
(defvar pushnew-internal)
|
|
||||||
|
|
||||||
(defmacro pushnew (x place &rest keys)
|
(defmacro pushnew (x place &rest keys)
|
||||||
"(pushnew X PLACE): insert X at the head of the list if not already there.
|
"(pushnew X PLACE): insert X at the head of the list if not already there.
|
||||||
Like (push X PLACE), except that the list is unmodified if X is `eql' to
|
Like (push X PLACE), except that the list is unmodified if X is `eql' to
|
||||||
|
|
@ -159,7 +157,8 @@ an element already on the list.
|
||||||
\n(fn X PLACE [KEYWORD VALUE]...)"
|
\n(fn X PLACE [KEYWORD VALUE]...)"
|
||||||
(if (symbolp place)
|
(if (symbolp place)
|
||||||
(if (null keys)
|
(if (null keys)
|
||||||
`(if (memql ,x ,place) ,place (setq ,place (cons ,x ,place)))
|
`(let ((x ,x))
|
||||||
|
(if (memql x ,place) ,place (setq ,place (cons x ,place))))
|
||||||
(list 'setq place (list* 'adjoin x place keys)))
|
(list 'setq place (list* 'adjoin x place keys)))
|
||||||
(list* 'callf2 'adjoin x place keys)))
|
(list* 'callf2 'adjoin x place keys)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue