Commit 19b2f8f1 authored by Roland McGrath's avatar Roland McGrath
Browse files

*** empty log message ***

parent 121f0d57
...@@ -209,25 +209,25 @@ if that value is non-nil." ...@@ -209,25 +209,25 @@ if that value is non-nil."
"Evaluate sexp before point; print value in minibuffer. "Evaluate sexp before point; print value in minibuffer.
With argument, print output into current buffer." With argument, print output into current buffer."
(interactive "P") (interactive "P")
(prin1 (let ((stab (syntax-table))) (let ((standard-output (if arg (current-buffer) t)))
(eval (unwind-protect (prin1 (let ((stab (syntax-table)))
(save-excursion (eval (unwind-protect
(set-syntax-table emacs-lisp-mode-syntax-table) (save-excursion
(forward-sexp -1) (set-syntax-table emacs-lisp-mode-syntax-table)
(read (current-buffer))) (forward-sexp -1)
(set-syntax-table stab)))) (read (current-buffer)))
(if arg (current-buffer) t))) (set-syntax-table stab)))))))
(defun eval-defun (arg) (defun eval-defun (arg)
"Evaluate defun that point is in or before. "Evaluate defun that point is in or before.
Print value in minibuffer. Print value in minibuffer.
With argument, insert value in current buffer after the defun." With argument, insert value in current buffer after the defun."
(interactive "P") (interactive "P")
(prin1 (eval (save-excursion (let ((standard-output (if arg (current-buffer) t)))
(end-of-defun) (prin1 (eval (save-excursion
(beginning-of-defun) (end-of-defun)
(read (current-buffer)))) (beginning-of-defun)
(if arg (current-buffer) t))) (read (current-buffer)))))))
(defun lisp-comment-indent () (defun lisp-comment-indent ()
(if (looking-at "\\s<\\s<\\s<") (if (looking-at "\\s<\\s<\\s<")
......
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