Make C-x C-e' work more like
C-M-x' on defvar etc
* doc/emacs/building.texi (Lisp Eval): Document it. * lisp/emacs-lisp/pp.el (pp-eval-last-sexp): Ditto. * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Work more like `eval-defun': Re-evaluate defvar/defcustom/defface forms.
This commit is contained in:
parent
1117366d03
commit
c6ecf6428e
4 changed files with 31 additions and 12 deletions
|
@ -164,8 +164,11 @@ With argument, pretty-print output into current buffer.
|
|||
Ignores leading comment characters."
|
||||
(interactive "P")
|
||||
(if arg
|
||||
(insert (pp-to-string (eval (pp-last-sexp) lexical-binding)))
|
||||
(pp-eval-expression (pp-last-sexp))))
|
||||
(insert (pp-to-string (eval (elisp--eval-defun-1
|
||||
(macroexpand (pp-last-sexp)))
|
||||
lexical-binding)))
|
||||
(pp-eval-expression (elisp--eval-defun-1
|
||||
(macroexpand (pp-last-sexp))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun pp-macroexpand-last-sexp (arg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue