aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/cl-lib.el19
2 files changed, 13 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 064b141cdde..f2fa5a37ac7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12012-06-30 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2.
4
12012-06-29 Dmitry Antipov <dmantipov@yandex.ru> 52012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
2 6
3 * fringe.el (fringe-mode): Doc fix. 7 * fringe.el (fringe-mode): Doc fix.
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 34351e4830f..51402f2e8aa 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -151,16 +151,15 @@ an element already on the list.
151 [keywordp form]))) 151 [keywordp form])))
152 (if (symbolp place) 152 (if (symbolp place)
153 (if (null keys) 153 (if (null keys)
154 (let ((var (make-symbol "--cl-x--"))) 154 (macroexp-let2 nil var x
155 `(let ((,var ,x)) 155 `(if (memql ,var ,place)
156 (if (memql ,var ,place) 156 ;; This symbol may later on expand to actual code which then
157 ;; This symbol may later on expand to actual code which then 157 ;; trigger warnings like "value unused" since cl-pushnew's
158 ;; trigger warnings like "value unused" since cl-pushnew's return 158 ;; return value is rarely used. It should not matter that
159 ;; value is rarely used. It should not matter that other 159 ;; other warnings may be silenced, since `place' is used
160 ;; warnings may be silenced, since `place' is used earlier and 160 ;; earlier and should have triggered them already.
161 ;; should have triggered them already. 161 (with-no-warnings ,place)
162 (with-no-warnings ,place) 162 (setq ,place (cons ,var ,place))))
163 (setq ,place (cons ,var ,place)))))
164 (list 'setq place (cl-list* 'cl-adjoin x place keys))) 163 (list 'setq place (cl-list* 'cl-adjoin x place keys)))
165 (cl-list* 'cl-callf2 'cl-adjoin x place keys))) 164 (cl-list* 'cl-callf2 'cl-adjoin x place keys)))
166 165