From eb486e20b02b7382efc8fbd2ec1315a510d69ad3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 10 Jan 2007 01:15:19 +0000 Subject: [PATCH] (momentary-string-display): Use save-excursion. --- lisp/ChangeLog | 2 ++ lisp/subr.el | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 809f6510b9c..997ead93bc8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2007-01-10 Richard Stallman + * subr.el (momentary-string-display): Use save-excursion. + * emacs-lisp/pp.el (pp-eval-expression): Once again eval the argument, but read it as `X' does. diff --git a/lisp/subr.el b/lisp/subr.el index c5c12137e55..e7e9867b13e 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1905,11 +1905,11 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." (recenter (/ (window-height) 2))) ;; If that pushed message start off the screen, ;; scroll to start it at the top of the screen. - (move-to-window-line 0) - (if (> (point) pos) - (progn + (save-excursion + (move-to-window-line 0) + (if (> (point) pos) (goto-char pos) - (recenter 0))) + (recenter 0))) (message (or message "Type %s to continue editing.") (single-key-description exit-char)) (let (char) -- 2.39.2