Changeset 4166 for trunk/lisp/emacs-lisp/cl.el
- Timestamp:
- 09/18/06 20:48:14 (2 years ago)
- Files:
-
- trunk/lisp/emacs-lisp/cl.el (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/emacs-lisp/cl.el
r4037 r4166 150 150 (list 'callf2 'cons x place))) 151 151 152 (defvar pushnew-internal) 153 152 154 (defmacro pushnew (x place &rest keys) 153 155 "(pushnew X PLACE): insert X at the head of the list if not already there. … … 156 158 \nKeywords supported: :test :test-not :key 157 159 \n(fn X PLACE [KEYWORD VALUE]...)" 158 (if (symbolp place) (list 'setq place (list* 'adjoin x place keys)) 160 (if (symbolp place) 161 (if (null keys) 162 `(let ((pushnew-internal ,place)) 163 (add-to-list 'pushnew-internal ,x nil 'eql) 164 (setq ,place pushnew-internal)) 165 (list 'setq place (list* 'adjoin x place keys))) 159 166 (list* 'callf2 'adjoin x place keys))) 160 167
