diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-29 22:00:08 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-29 22:00:08 -0400 |
commit | 3cfbebba71090f6ea0c2ca4a6056a3e645cee2e8 (patch) | |
tree | 42c63a36f52ab6b4e3c6cd8394bdfc316e9be806 /lisp/emacs-lisp | |
parent | 2e5a663126a0260f5a8bb9d12b8c02c3745ea94b (diff) | |
download | emacs-3cfbebba71090f6ea0c2ca4a6056a3e645cee2e8.tar.gz emacs-3cfbebba71090f6ea0c2ca4a6056a3e645cee2e8.tar.bz2 emacs-3cfbebba71090f6ea0c2ca4a6056a3e645cee2e8.zip |
* lisp/emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 19 |
1 files changed, 9 insertions, 10 deletions
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. [keywordp form]))) (if (symbolp place) (if (null keys) - (let ((var (make-symbol "--cl-x--"))) - `(let ((,var ,x)) - (if (memql ,var ,place) - ;; This symbol may later on expand to actual code which then - ;; trigger warnings like "value unused" since cl-pushnew's return - ;; value is rarely used. It should not matter that other - ;; warnings may be silenced, since `place' is used earlier and - ;; should have triggered them already. - (with-no-warnings ,place) - (setq ,place (cons ,var ,place))))) + (macroexp-let2 nil var x + `(if (memql ,var ,place) + ;; This symbol may later on expand to actual code which then + ;; trigger warnings like "value unused" since cl-pushnew's + ;; return value is rarely used. It should not matter that + ;; other warnings may be silenced, since `place' is used + ;; earlier and should have triggered them already. + (with-no-warnings ,place) + (setq ,place (cons ,var ,place)))) (list 'setq place (cl-list* 'cl-adjoin x place keys))) (cl-list* 'cl-callf2 'cl-adjoin x place keys))) |