summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-08-23 10:15:48 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-08-23 10:16:05 -0400
commit3b72b47cbd3e1a4b575d5ecc886e506d22a50a0c (patch)
tree63863377c177088afeb6cf373208418a201d8bea
parent1a4a12a2a8dbc45bf64fbbd6e19385424d06437d (diff)
downloademacs-3b72b47cbd3e1a4b575d5ecc886e506d22a50a0c.tar.gz
* lisp/progmodes/elisp-mode.el (elisp--local-variables-1): Fix bug#50034
Don't burp if the arg list of a function is not actually a list.
-rw-r--r--lisp/progmodes/elisp-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 4617a01947c..9dc67010aa7 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -383,7 +383,9 @@ be used instead.
(setq sexp nil))
(`(lambda ,args . ,body)
(elisp--local-variables-1
- (append (remq '&optional (remq '&rest args)) vars)
+ (let ((args (if (listp args) args)))
+ ;; FIXME: Exit the loop if witness is in args.
+ (append (remq '&optional (remq '&rest args)) vars))
(car (last body))))
(`(condition-case ,_ ,e) (elisp--local-variables-1 vars e))
(`(condition-case ,v ,_ . ,catches)