* lisp/subr.el (add-to-list): Preserve return value in compiler-macro.
Fixes: debbugs:15692
This commit is contained in:
parent
3eb91f7bf7
commit
37241f6206
2 changed files with 13 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* subr.el (add-to-list): Preserve return value in compiler-macro
|
||||
(bug#15692).
|
||||
|
||||
2013-10-25 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
|
||||
|
||||
* progmodes/octave.el (octave-lookfor): Handle empty lookfor
|
||||
|
|
15
lisp/subr.el
15
lisp/subr.el
|
@ -1541,13 +1541,14 @@ other hooks, such as major mode hooks, can do the job."
|
|||
(byte-compile-log-warning msg t :error))))
|
||||
(code
|
||||
(macroexp-let2 macroexp-copyable-p x element
|
||||
`(unless ,(if compare-fn
|
||||
(progn
|
||||
(require 'cl-lib)
|
||||
`(cl-member ,x ,sym :test ,compare-fn))
|
||||
;; For bootstrapping reasons, don't rely on
|
||||
;; cl--compiler-macro-member for the base case.
|
||||
`(member ,x ,sym))
|
||||
`(if ,(if compare-fn
|
||||
(progn
|
||||
(require 'cl-lib)
|
||||
`(cl-member ,x ,sym :test ,compare-fn))
|
||||
;; For bootstrapping reasons, don't rely on
|
||||
;; cl--compiler-macro-member for the base case.
|
||||
`(member ,x ,sym))
|
||||
,sym
|
||||
,(if append
|
||||
`(setq ,sym (append ,sym (list ,x)))
|
||||
`(push ,x ,sym))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue