diff options
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index e6e55a37a7c..935e55c5d70 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -1132,7 +1132,9 @@ character)." | |||
| 1132 | (eval-expression-get-print-arguments eval-last-sexp-arg-internal))) | 1132 | (eval-expression-get-print-arguments eval-last-sexp-arg-internal))) |
| 1133 | ;; Setup the lexical environment if lexical-binding is enabled. | 1133 | ;; Setup the lexical environment if lexical-binding is enabled. |
| 1134 | (elisp--eval-last-sexp-print-value | 1134 | (elisp--eval-last-sexp-print-value |
| 1135 | (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding) | 1135 | (eval (macroexpand-all |
| 1136 | (eval-sexp-add-defvars (elisp--preceding-sexp))) | ||
| 1137 | lexical-binding) | ||
| 1136 | (if insert-value (current-buffer) t) no-truncate char-print-limit))) | 1138 | (if insert-value (current-buffer) t) no-truncate char-print-limit))) |
| 1137 | 1139 | ||
| 1138 | (defun elisp--eval-last-sexp-print-value | 1140 | (defun elisp--eval-last-sexp-print-value |
| @@ -1165,7 +1167,6 @@ character)." | |||
| 1165 | (defun eval-sexp-add-defvars (exp &optional pos) | 1167 | (defun eval-sexp-add-defvars (exp &optional pos) |
| 1166 | "Prepend EXP with all the `defvar's that precede it in the buffer. | 1168 | "Prepend EXP with all the `defvar's that precede it in the buffer. |
| 1167 | POS specifies the starting position where EXP was found and defaults to point." | 1169 | POS specifies the starting position where EXP was found and defaults to point." |
| 1168 | (setq exp (macroexpand-all exp)) ;Eager macro-expansion. | ||
| 1169 | (if (not lexical-binding) | 1170 | (if (not lexical-binding) |
| 1170 | exp | 1171 | exp |
| 1171 | (save-excursion | 1172 | (save-excursion |