# HG changeset patch # User Richard M. Stallman # Date 716842039 0 # Node ID c205d560cc222597a901a42a86010ca196da7f8a # Parent 7d6e0669b3dc8fca7840d017eff93a9b06430cc3 entered into RCS diff -r 7d6e0669b3dc -r c205d560cc22 lisp/emacs-lisp/lisp-mode.el --- a/lisp/emacs-lisp/lisp-mode.el Fri Sep 18 07:43:41 1992 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Fri Sep 18 18:47:19 1992 +0000 @@ -215,13 +215,16 @@ "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 @@ (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)