From: Stefan Monnier Date: Tue, 23 Aug 2022 14:15:48 +0000 (-0400) Subject: * lisp/progmodes/elisp-mode.el (elisp--local-variables-1): Fix bug#50034 X-Git-Tag: emacs-29.0.90~1893^2~77 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3b72b47cbd3e1a4b575d5ecc886e506d22a50a0c;p=emacs.git * 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. --- 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)