comparison lisp/subr.el @ 75175:c6f5de1b0b6e

(momentary-string-display): Use save-excursion.
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Jan 2007 01:15:07 +0000
parents f4fe3d3016b1
children e3694f1cb928 32073cbc5eb6
comparison
equal deleted inserted replaced
75174:5fb06d3ea025 75175:c6f5de1b0b6e
1903 ;; If the message end is off screen, recenter now. 1903 ;; If the message end is off screen, recenter now.
1904 (if (< (window-end nil t) (+ pos (length string))) 1904 (if (< (window-end nil t) (+ pos (length string)))
1905 (recenter (/ (window-height) 2))) 1905 (recenter (/ (window-height) 2)))
1906 ;; If that pushed message start off the screen, 1906 ;; If that pushed message start off the screen,
1907 ;; scroll to start it at the top of the screen. 1907 ;; scroll to start it at the top of the screen.
1908 (move-to-window-line 0) 1908 (save-excursion
1909 (if (> (point) pos) 1909 (move-to-window-line 0)
1910 (progn 1910 (if (> (point) pos)
1911 (goto-char pos) 1911 (goto-char pos)
1912 (recenter 0))) 1912 (recenter 0)))
1913 (message (or message "Type %s to continue editing.") 1913 (message (or message "Type %s to continue editing.")
1914 (single-key-description exit-char)) 1914 (single-key-description exit-char))
1915 (let (char) 1915 (let (char)
1916 (if (integerp exit-char) 1916 (if (integerp exit-char)
1917 (condition-case nil 1917 (condition-case nil