]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle automatic macro expansion by elisp-completion-at-point
authorJustin Burkett <justin@burkett.cc>
Mon, 18 Dec 2017 20:15:28 +0000 (15:15 -0500)
committerJustin Burkett <justin@burkett.cc>
Wed, 20 Dec 2017 03:30:59 +0000 (22:30 -0500)
The function `elisp--local-variables' inserts an unbound variable,
`elisp--witness--lisp', into macro forms to determine the locally bound
variables for `elisp-completion-at-point'. It ends up throwing a lot of errors
since it can occupy the position of a keyword (or look like a second argument to
a keyword that takes one). Deleting it when it's at the top level should be
harmless since there should be no locally bound variables to discover here
anyway.

lisp/use-package/use-package-core.el

index 80f1fe1f1d05b0564a51989a5121de7045b89380..1b5196a7b6d27a0e387e075467883281888ac0d1 100644 (file)
@@ -559,6 +559,15 @@ extending any keys already present."
   (let* ((name-symbol (if (stringp name) (intern name) name))
          (name-string (symbol-name name-symbol)))
 
+    ;; The function `elisp--local-variables' inserts this unbound variable into
+    ;; macro forms to determine the locally bound variables for
+    ;; `elisp-completion-at-point'. It ends up throwing a lot of errors since it
+    ;; can occupy the position of a keyword (or look like a second argument to a
+    ;; keyword that takes one). Deleting it when it's at the top level should be
+    ;; harmless since there should be no locally bound variables to discover
+    ;; here anyway.
+    (setq args (delq 'elisp--witness--lisp args))
+
     ;; Reduce the set of keywords down to its most fundamental expression.
     (setq args (use-package-unalias-keywords name-symbol args))