diff options
| author | Stefan Monnier | 2013-10-24 21:10:27 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-10-24 21:10:27 -0400 |
| commit | 37241f62069b8f60e28d419ca502dd04ba567ab9 (patch) | |
| tree | d36763d4946b676fc77674858fa0ee0d155d9acf | |
| parent | 3eb91f7bf727c7fa4bf829c1f0cdfcf6ac3cf4fa (diff) | |
| download | emacs-37241f62069b8f60e28d419ca502dd04ba567ab9.tar.gz emacs-37241f62069b8f60e28d419ca502dd04ba567ab9.zip | |
* lisp/subr.el (add-to-list): Preserve return value in compiler-macro.
Fixes: debbugs:15692
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/subr.el | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00d8c4240bd..2513f838b57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-10-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * subr.el (add-to-list): Preserve return value in compiler-macro | ||
| 4 | (bug#15692). | ||
| 5 | |||
| 1 | 2013-10-25 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> | 6 | 2013-10-25 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> |
| 2 | 7 | ||
| 3 | * progmodes/octave.el (octave-lookfor): Handle empty lookfor | 8 | * progmodes/octave.el (octave-lookfor): Handle empty lookfor |
diff --git a/lisp/subr.el b/lisp/subr.el index 952b9b601dc..05bbe6ea649 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1541,13 +1541,14 @@ other hooks, such as major mode hooks, can do the job." | |||
| 1541 | (byte-compile-log-warning msg t :error)))) | 1541 | (byte-compile-log-warning msg t :error)))) |
| 1542 | (code | 1542 | (code |
| 1543 | (macroexp-let2 macroexp-copyable-p x element | 1543 | (macroexp-let2 macroexp-copyable-p x element |
| 1544 | `(unless ,(if compare-fn | 1544 | `(if ,(if compare-fn |
| 1545 | (progn | 1545 | (progn |
| 1546 | (require 'cl-lib) | 1546 | (require 'cl-lib) |
| 1547 | `(cl-member ,x ,sym :test ,compare-fn)) | 1547 | `(cl-member ,x ,sym :test ,compare-fn)) |
| 1548 | ;; For bootstrapping reasons, don't rely on | 1548 | ;; For bootstrapping reasons, don't rely on |
| 1549 | ;; cl--compiler-macro-member for the base case. | 1549 | ;; cl--compiler-macro-member for the base case. |
| 1550 | `(member ,x ,sym)) | 1550 | `(member ,x ,sym)) |
| 1551 | ,sym | ||
| 1551 | ,(if append | 1552 | ,(if append |
| 1552 | `(setq ,sym (append ,sym (list ,x))) | 1553 | `(setq ,sym (append ,sym (list ,x))) |
| 1553 | `(push ,x ,sym)))))) | 1554 | `(push ,x ,sym)))))) |