diff options
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 26b6c6fd322..e083b628cde 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-06-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp/cl-lib.el (cl-pushnew): Don't capture X (bug#11811). | ||
| 4 | |||
| 1 | 2012-06-28 Julien Danjou <julien@danjou.info> | 5 | 2012-06-28 Julien Danjou <julien@danjou.info> |
| 2 | 6 | ||
| 3 | * term.el (term-handle-colors-array): Use a set of new faces to | 7 | * term.el (term-handle-colors-array): Use a set of new faces to |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 990e66d91aa..34351e4830f 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -151,15 +151,16 @@ 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 ((x ,x)) | 154 | (let ((var (make-symbol "--cl-x--"))) |
| 155 | (if (memql x ,place) | 155 | `(let ((,var ,x)) |
| 156 | ;; This symbol may later on expand to actual code which then | 156 | (if (memql ,var ,place) |
| 157 | ;; trigger warnings like "value unused" since cl-pushnew's return | 157 | ;; This symbol may later on expand to actual code which then |
| 158 | ;; value is rarely used. It should not matter that other | 158 | ;; trigger warnings like "value unused" since cl-pushnew's return |
| 159 | ;; warnings may be silenced, since `place' is used earlier and | 159 | ;; value is rarely used. It should not matter that other |
| 160 | ;; should have triggered them already. | 160 | ;; warnings may be silenced, since `place' is used earlier and |
| 161 | (with-no-warnings ,place) | 161 | ;; should have triggered them already. |
| 162 | (setq ,place (cons x ,place)))) | 162 | (with-no-warnings ,place) |
| 163 | (setq ,place (cons ,var ,place))))) | ||
| 163 | (list 'setq place (cl-list* 'cl-adjoin x place keys))) | 164 | (list 'setq place (cl-list* 'cl-adjoin x place keys))) |
| 164 | (cl-list* 'cl-callf2 'cl-adjoin x place keys))) | 165 | (cl-list* 'cl-callf2 'cl-adjoin x place keys))) |
| 165 | 166 | ||