summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-06-03 11:28:10 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-06-03 11:28:10 -0400
commit1f8fdd5391e2346e181ab7cb19144d072efdc7f7 (patch)
tree968f76be97ab130c32f4f450ff6271a89ef05f50 /lisp/emacs-lisp/lisp-mode.el
parenta8a7c5f651cd9c3d354a4cb4938e5289d4cbbe4b (diff)
downloademacs-1f8fdd5391e2346e181ab7cb19144d072efdc7f7.tar.gz
emacs-1f8fdd5391e2346e181ab7cb19144d072efdc7f7.tar.bz2
emacs-1f8fdd5391e2346e181ab7cb19144d072efdc7f7.zip
* lisp/emacs-lisp/lisp-mode.el (eval-sexp-add-defvars): Expand macros
eagerly. Fixes: debbugs:14422
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index ae855052524..02b020fa241 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -809,6 +809,7 @@ With argument, print output into current buffer."
(defun eval-sexp-add-defvars (exp &optional pos)
"Prepend EXP with all the `defvar's that precede it in the buffer.
POS specifies the starting position where EXP was found and defaults to point."
+ (setq exp (macroexpand-all exp)) ;Eager macro-expansion.
(if (not lexical-binding)
exp
(save-excursion