Commit 10fff837 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/progmodes/elisp-mode.el (elisp--local-variables-1):

Handle quoted expressions.

Fixes: debbugs:18688
parent 643b1e97
2014-10-15 Stefan Monnier <>
* progmodes/elisp-mode.el (elisp--local-variables-1):
Handle quoted expressions (bug#18688).
2014-10-14 Jérémy Compostella <>
Michael Albinus <>
......@@ -255,18 +255,27 @@ Blank lines separate paragraphs. Semicolons start comments.
(dolist (binding bindings)
(push (or (car-safe binding) binding) vars))
(elisp--local-variables-1 vars (car (last body)))))
(`(lambda ,_) (setq sexp nil))
(`(lambda ,_args)
;; FIXME: Look for the witness inside `args'.
(setq sexp nil))
(`(lambda ,args . ,body)
(append args vars) (car (last body))))
(append (remq '&optional (remq '&rest args)) vars)
(car (last body))))
(`(condition-case ,_ ,e) (elisp--local-variables-1 vars e))
(`(condition-case ,v ,_ . ,catches)
(cons v vars) (cdr (car (last catches)))))
(`(quote . ,_)
;; FIXME: Look for the witness inside sexp.
(setq sexp nil))
;; FIXME: Handle `cond'.
(`(,_ . ,_)
(elisp--local-variables-1 vars (car (last sexp))))
(`elisp--witness--lisp (or vars '(nil)))
(_ nil)))
;; We didn't find the witness in the last element so we try to
;; backtrack to the last-but-one.
(setq sexp (ignore-errors (butlast sexp)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment