[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108794: lisp/emacs-lisp/cl-lib.el (c
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108794: lisp/emacs-lisp/cl-lib.el (cl-pushnew): Don't capture X (bug#11811). |
Date: |
Fri, 29 Jun 2012 01:04:27 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108794
fixes bug: http://debbugs.gnu.org/11811
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Fri 2012-06-29 01:04:27 +0200
message:
lisp/emacs-lisp/cl-lib.el (cl-pushnew): Don't capture X (bug#11811).
modified:
lisp/ChangeLog
lisp/emacs-lisp/cl-lib.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-06-28 10:40:24 +0000
+++ b/lisp/ChangeLog 2012-06-28 23:04:27 +0000
@@ -1,3 +1,7 @@
+2012-06-28 Juanma Barranquero <address@hidden>
+
+ * emacs-lisp/cl-lib.el (cl-pushnew): Don't capture X (bug#11811).
+
2012-06-28 Julien Danjou <address@hidden>
* term.el (term-handle-colors-array): Use a set of new faces to
=== modified file 'lisp/emacs-lisp/cl-lib.el'
--- a/lisp/emacs-lisp/cl-lib.el 2012-06-22 21:24:54 +0000
+++ b/lisp/emacs-lisp/cl-lib.el 2012-06-28 23:04:27 +0000
@@ -151,15 +151,16 @@
[keywordp form])))
(if (symbolp place)
(if (null keys)
- `(let ((x ,x))
- (if (memql x ,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 x ,place))))
+ (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)))))
(list 'setq place (cl-list* 'cl-adjoin x place keys)))
(cl-list* 'cl-callf2 'cl-adjoin x place keys)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108794: lisp/emacs-lisp/cl-lib.el (cl-pushnew): Don't capture X (bug#11811).,
Juanma Barranquero <=