Mercurial > hg > xemacs-beta
diff lisp/cl.el @ 3355:721daee0fcd8
[xemacs-hg @ 2006-04-23 20:12:25 by aidan]
Take on board feedback from Stephen on my last changes.
author | aidan |
---|---|
date | Sun, 23 Apr 2006 20:12:31 +0000 |
parents | 29234c1a76c7 |
children | 8f1ee2d15784 |
line wrap: on
line diff
--- a/lisp/cl.el Sun Apr 23 16:11:34 2006 +0000 +++ b/lisp/cl.el Sun Apr 23 20:12:31 2006 +0000 @@ -159,15 +159,17 @@ (cl-do-pop place))) (defmacro push (newelt listname) - "Add NEWELT to the list stored in LISTNAME. -Analogous to (setf LISTNAME (cons NEWELT LISTNAME)), though more careful about -evaluating each argument only once and in the right order. LISTNAME may -be a symbol, or any generalized variable allowed by `setf'." + "Add NEWELT at the beginning of the list stored in LISTNAME. +Analogous to (setf LISTNAME (cons NEWELT LISTNAME)), though more careful +about evaluating each argument only once and in the right order. LISTNAME +may be a symbol, or any generalized variable allowed by `setf'; that is, it +does not necessarily have to be a list, though `push' is most often used on +lists. " (if (symbolp listname) `(setq ,listname (cons ,newelt ,listname)) (list 'callf2 'cons newelt listname))) (defmacro pushnew (newelt listname &rest keys) - "Add NEWELT to the list stored in LISTNAME, unless it's already there. + "Add NEWELT at the beginning of LISTNAME, unless it's already in LISTNAME. Like (push NEWELT LISTNAME), except that the list is unmodified if NEWELT is `eql' to an element already on the list. Keywords supported: :test :test-not :key"