* bug#5670: Bug in `momentary-string-display'
@ 2010-03-01 23:52 Štěpán Němec
2010-03-03 4:00 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Štěpán Němec @ 2010-03-01 23:52 UTC (permalink / raw)
To: 5670
Let binding of `message' inside the function shadows one of the
arguments, leading to the momentarily inserted string (instead of the
message) being displayed in the echo area.
The patch below fixes that.
--- 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.")
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#5670: Bug in `momentary-string-display'
2010-03-01 23:52 bug#5670: Bug in `momentary-string-display' Štěpán Němec
@ 2010-03-03 4:00 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2010-03-03 4:00 UTC (permalink / raw)
To: 5670-done
Thank you; applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-03 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01 23:52 bug#5670: Bug in `momentary-string-display' Štěpán Němec
2010-03-03 4:00 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).