(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.
This commit is contained in:
parent
932d0fdb4f
commit
4cd31cf019
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue