aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorŠtěpán Němec2010-03-02 19:58:26 -0800
committerGlenn Morris2010-03-02 19:58:26 -0800
commitbc91aee9669b7cb67c981e31201d76df0edd9aeb (patch)
tree4ca2de517e7930268811324a49073b61b603fe3e
parent1ddd6622975d5bfeb6aceb2956f9ca8ca4a8b119 (diff)
downloademacs-bc91aee9669b7cb67c981e31201d76df0edd9aeb.tar.gz
emacs-bc91aee9669b7cb67c981e31201d76df0edd9aeb.zip
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 @@
12010-03-03 Štěpán Němec <stepnem@gmail.com>
2
3 * subr.el (momentary-string-display): Don't overwrite the MESSAGE
4 argument with a local variable. (Bug#5670)
5
12010-03-02 Juri Linkov <juri@jurta.org> 62010-03-02 Juri Linkov <juri@jurta.org>
2 7
3 * info.el (Info-index-next): Decrement line number by 2. (Bug#5652) 8 * 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.
2196If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." 2196If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
2197 (or exit-char (setq exit-char ?\s)) 2197 (or exit-char (setq exit-char ?\s))
2198 (let ((ol (make-overlay pos pos)) 2198 (let ((ol (make-overlay pos pos))
2199 (message (copy-sequence string))) 2199 (str (copy-sequence string)))
2200 (unwind-protect 2200 (unwind-protect
2201 (progn 2201 (progn
2202 (save-excursion 2202 (save-excursion
2203 (overlay-put ol 'after-string message) 2203 (overlay-put ol 'after-string str)
2204 (goto-char pos) 2204 (goto-char pos)
2205 ;; To avoid trouble with out-of-bounds position 2205 ;; To avoid trouble with out-of-bounds position
2206 (setq pos (point)) 2206 (setq pos (point))
2207 ;; If the message end is off screen, recenter now. 2207 ;; If the string end is off screen, recenter now.
2208 (if (<= (window-end nil t) pos) 2208 (if (<= (window-end nil t) pos)
2209 (recenter (/ (window-height) 2)))) 2209 (recenter (/ (window-height) 2))))
2210 (message (or message "Type %s to continue editing.") 2210 (message (or message "Type %s to continue editing.")