aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1992-09-18 18:47:19 +0000
committerRichard M. Stallman <[email protected]>1992-09-18 18:47:19 +0000
commitcfe158ab3463c1ed31e78719daaafaedb875bea1 (patch)
treecec44b4abbafb5920644982b9510a185fe409fa7 /lisp/emacs-lisp/lisp-mode.el
parentdd492f047a0dcf03119aa214a6b002cb6fc347da (diff)
entered into RCS
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 2e4716f325..b0f823e010 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -215,13 +215,16 @@ if that value is non-nil."
"Evaluate sexp before point; print value in minibuffer.
With argument, print output into current buffer."
(interactive "P")
- (let ((standard-output (if arg (current-buffer) t)))
+ (let ((standard-output (if arg (current-buffer) t))
+ (opoint (point)))
(prin1 (let ((stab (syntax-table)))
(eval (unwind-protect
(save-excursion
(set-syntax-table emacs-lisp-mode-syntax-table)
(forward-sexp -1)
- (read (current-buffer)))
+ (save-restriction
+ (narrow-to-region (point-min) opoint)
+ (read (current-buffer))))
(set-syntax-table stab)))))))
(defun eval-defun (arg)
@@ -481,6 +484,7 @@ of the start of the containing expression."
(put 'save-excursion 'lisp-indent-function 0)
(put 'save-window-excursion 'lisp-indent-function 0)
(put 'save-restriction 'lisp-indent-function 0)
+(put 'save-match-data 'lisp-indent-function 0)
(put 'let 'lisp-indent-function 1)
(put 'let* 'lisp-indent-function 1)
(put 'while 'lisp-indent-function 1)