summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŠtěpán Němec <stepnem@gmail.com>2010-03-02 19:58:26 -0800
committerGlenn Morris <rgm@gnu.org>2010-03-02 19:58:26 -0800
commitbc91aee9669b7cb67c981e31201d76df0edd9aeb (patch)
tree4ca2de517e7930268811324a49073b61b603fe3e
parent1ddd6622975d5bfeb6aceb2956f9ca8ca4a8b119 (diff)
downloademacs-bc91aee9669b7cb67c981e31201d76df0edd9aeb.tar.gz
Close bug#5670 with patch from Štěpán Němec <stepnem at gmail.com>.
* subr.el (momentary-string-display): Don't overwrite the MESSAGE argument with a local variable. (Bug#5670)
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/subr.el6
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 <stepnem@gmail.com>
+
+ * subr.el (momentary-string-display): Don't overwrite the MESSAGE
+ argument with a local variable. (Bug#5670)
+
2010-03-02 Juri Linkov <juri@jurta.org>
* 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.")