emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108804: * lisp/emacs-lisp/cl-lib.el


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108804: * lisp/emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2.
Date: Fri, 29 Jun 2012 22:00:08 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108804
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-06-29 22:00:08 -0400
message:
  * lisp/emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/cl-lib.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-29 11:48:08 +0000
+++ b/lisp/ChangeLog    2012-06-30 02:00:08 +0000
@@ -1,3 +1,7 @@
+2012-06-30  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2.
+
 2012-06-29  Dmitry Antipov  <address@hidden>
 
        * fringe.el (fringe-mode): Doc fix.

=== modified file 'lisp/emacs-lisp/cl-lib.el'
--- a/lisp/emacs-lisp/cl-lib.el 2012-06-28 23:04:27 +0000
+++ b/lisp/emacs-lisp/cl-lib.el 2012-06-30 02:00:08 +0000
@@ -151,16 +151,15 @@
                   [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)))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]