diff options
| author | Kim F. Storm | 2006-10-03 09:19:17 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-10-03 09:19:17 +0000 |
| commit | fcecceea0fd32073e8d0496ca841e6db8b18b2ad (patch) | |
| tree | e1b828ed23b5122354d3603a31ed50586a4fcdcc | |
| parent | 73812be664abb57bdde5fadd7766f0a184335ffc (diff) | |
| download | emacs-fcecceea0fd32073e8d0496ca841e6db8b18b2ad.tar.gz emacs-fcecceea0fd32073e8d0496ca841e6db8b18b2ad.zip | |
(pushnew-internal): Remove defvar.
(pushnew): Fix last change.
| -rw-r--r-- | lisp/emacs-lisp/cl.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 3399f7e7b20..d2d68189230 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el | |||
| @@ -149,8 +149,6 @@ be a symbol, or any generalized variable allowed by `setf'." | |||
| 149 | (if (symbolp place) (list 'setq place (list 'cons x place)) | 149 | (if (symbolp place) (list 'setq place (list 'cons x place)) |
| 150 | (list 'callf2 'cons x place))) | 150 | (list 'callf2 'cons x place))) |
| 151 | 151 | ||
| 152 | (defvar pushnew-internal) | ||
| 153 | |||
| 154 | (defmacro pushnew (x place &rest keys) | 152 | (defmacro pushnew (x place &rest keys) |
| 155 | "(pushnew X PLACE): insert X at the head of the list if not already there. | 153 | "(pushnew X PLACE): insert X at the head of the list if not already there. |
| 156 | Like (push X PLACE), except that the list is unmodified if X is `eql' to | 154 | 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. | |||
| 159 | \n(fn X PLACE [KEYWORD VALUE]...)" | 157 | \n(fn X PLACE [KEYWORD VALUE]...)" |
| 160 | (if (symbolp place) | 158 | (if (symbolp place) |
| 161 | (if (null keys) | 159 | (if (null keys) |
| 162 | `(if (memql ,x ,place) ,place (setq ,place (cons ,x ,place))) | 160 | `(let ((x ,x)) |
| 161 | (if (memql x ,place) ,place (setq ,place (cons x ,place)))) | ||
| 163 | (list 'setq place (list* 'adjoin x place keys))) | 162 | (list 'setq place (list* 'adjoin x place keys))) |
| 164 | (list* 'callf2 'adjoin x place keys))) | 163 | (list* 'callf2 'adjoin x place keys))) |
| 165 | 164 | ||