1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00

(pushnew): Rework 2006-09-10 change. Use memql

instead of add-to-list in the simple case.
This commit is contained in:
Kim F. Storm 2006-09-20 23:12:15 +00:00
parent 008ef0efaa
commit 5bde639f47

View file

@ -159,9 +159,7 @@ an element already on the list.
\n(fn X PLACE [KEYWORD VALUE]...)"
(if (symbolp place)
(if (null keys)
`(let ((pushnew-internal ,place))
(add-to-list 'pushnew-internal ,x nil 'eql)
(setq ,place pushnew-internal))
`(if (memql ,x ,place) ,place (setq ,place (cons ,x ,place)))
(list 'setq place (list* 'adjoin x place keys)))
(list* 'callf2 'adjoin x place keys)))