diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-03-20 16:29:21 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-03-20 16:29:21 -0400 |
commit | 4cd31cf01964059ab29f735c7856c65631c46c28 (patch) | |
tree | 30ef2c74074cd9e0dc6407b198cbf685654474dc | |
parent | 932d0fdb4fb217adb4e894b595c2294abc4fef3e (diff) | |
download | emacs-4cd31cf01964059ab29f735c7856c65631c46c28.tar.gz |
(cl-defsubst): Ignore false-positive occurrences of args via &cl-defs
Fixes: debbugs:20149
* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Ignore false-positive
occurrences of args via &cl-defs.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cecec469ed8..ee4e021b940 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-03-20 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/cl-macs.el (cl-defsubst): Ignore false-positive + occurrences of args via &cl-defs (bug#20149). + 2015-03-20 Alan Mackenzie <acm@muc.de> Fix debbugs#20146 diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index d3866783447..75c6a5687c4 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2446,10 +2446,11 @@ The function's arguments should be treated as immutable. \(fn NAME ARGLIST [DOCSTRING] BODY...)" (declare (debug cl-defun) (indent 2)) (let* ((argns (cl--arglist-args args)) + (real-args (if (eq '&cl-defs (car args)) (cddr args) args)) (p argns) ;; (pbody (cons 'progn body)) ) - (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p)) + (while (and p (eq (cl--expr-contains real-args (car p)) 1)) (pop p)) `(progn ,(if p nil ; give up if defaults refer to earlier args `(cl-define-compiler-macro ,name |