From bc91aee9669b7cb67c981e31201d76df0edd9aeb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Tue, 2 Mar 2010 19:58:26 -0800 Subject: [PATCH] =?utf8?q?Close=20bug#5670=20with=20patch=20from=20=C3=85?= =?utf8?q?=C2=A0t=C3=84=C2=9Bp=C3=83=C2=A1n=20N=C3=84=C2=9Bmec=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * subr.el (momentary-string-display): Don't overwrite the MESSAGE argument with a local variable. (Bug#5670) --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 607154f9c3c..016ab7b431f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-03-03 Štěpán Němec + + * subr.el (momentary-string-display): Don't overwrite the MESSAGE + argument with a local variable. (Bug#5670) + 2010-03-02 Juri Linkov * info.el (Info-index-next): Decrement line number by 2. (Bug#5652) diff --git a/lisp/subr.el b/lisp/subr.el index 977d5a53f35..be06a558e5a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2196,15 +2196,15 @@ Display MESSAGE (optional fourth arg) in the echo area. If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." (or exit-char (setq exit-char ?\s)) (let ((ol (make-overlay pos pos)) - (message (copy-sequence string))) + (str (copy-sequence string))) (unwind-protect (progn (save-excursion - (overlay-put ol 'after-string message) + (overlay-put ol 'after-string str) (goto-char pos) ;; To avoid trouble with out-of-bounds position (setq pos (point)) - ;; If the message end is off screen, recenter now. + ;; If the string end is off screen, recenter now. (if (<= (window-end nil t) pos) (recenter (/ (window-height) 2)))) (message (or message "Type %s to continue editing.") -- 2.39.2