diff options
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/term/pc-win.el | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d4cdf2257c8..33b315367ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2009-04-08 Eli Zaretskii <eliz@gnu.org> | 1 | 2009-04-08 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * term/pc-win.el (msdos-last-help-message): New defvar. | ||
| 4 | (msdos-show-help): Use it to avoid saving the last message if it | ||
| 5 | was also a help message (Bug#2895). | ||
| 6 | |||
| 3 | * mail/rmail.el (rmail-simplified-subject): Normalize whitespace | 7 | * mail/rmail.el (rmail-simplified-subject): Normalize whitespace |
| 4 | in subject. This resurrects a feature, lost in transition to | 8 | in subject. This resurrects a feature, lost in transition to |
| 5 | mbox, whereby Subject is matched even if it's broken into several | 9 | mbox, whereby Subject is matched even if it's broken into several |
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index b0e62b1596c..6fb714c1412 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el | |||
| @@ -248,23 +248,30 @@ support other types of selections." | |||
| 248 | (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. | 248 | (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. |
| 249 | (fset 'set-border-color 'ignore) ; Not useful. | 249 | (fset 'set-border-color 'ignore) ; Not useful. |
| 250 | 250 | ||
| 251 | (defvar msdos-last-help-message nil | ||
| 252 | "The last help message received via `show-help-function'. | ||
| 253 | This is used by `msdos-show-help'.") | ||
| 254 | |||
| 251 | (defvar msdos-previous-message nil | 255 | (defvar msdos-previous-message nil |
| 252 | "The content of the echo area before help echo was displayed.") | 256 | "The content of the echo area before help echo was displayed.") |
| 253 | 257 | ||
| 254 | (defun msdos-show-help (help) | 258 | (defun msdos-show-help (help) |
| 255 | "Function installed as `show-help-function' on MS-DOS frames." | 259 | "Function installed as `show-help-function' on MS-DOS frames." |
| 256 | (when (and (not (window-minibuffer-p)) ;Don't overwrite minibuffer contents. | 260 | (when (and (not (window-minibuffer-p)) ;Don't overwrite minibuffer contents. |
| 257 | ;; Don't know how to reproduce it in Elisp: | ||
| 258 | ;; Don't overwrite a keystroke echo. | ||
| 259 | ;; (NILP (echo_message_buffer) || ok_to_overwrite_keystroke_echo) | ||
| 260 | (not cursor-in-echo-area)) ;Don't overwrite a prompt. | 261 | (not cursor-in-echo-area)) ;Don't overwrite a prompt. |
| 261 | (cond | 262 | (cond |
| 262 | ((stringp help) | 263 | ((stringp help) |
| 263 | (unless msdos-previous-message | 264 | (setq help (replace-regexp-in-string "\n" ", " help)) |
| 265 | (unless (or msdos-previous-message | ||
| 266 | (string-equal help (current-message)) | ||
| 267 | (and (stringp msdos-last-help-message) | ||
| 268 | (string-equal msdos-last-help-message | ||
| 269 | (current-message)))) | ||
| 264 | (setq msdos-previous-message (current-message))) | 270 | (setq msdos-previous-message (current-message))) |
| 271 | (setq msdos-last-help-message help) | ||
| 265 | (let ((message-truncate-lines nil) | 272 | (let ((message-truncate-lines nil) |
| 266 | (message-log-max nil)) | 273 | (message-log-max nil)) |
| 267 | (message "%s" (replace-regexp-in-string "\n" ", " help)))) | 274 | (message "%s" help))) |
| 268 | ((stringp msdos-previous-message) | 275 | ((stringp msdos-previous-message) |
| 269 | (let ((message-log-max nil)) | 276 | (let ((message-log-max nil)) |
| 270 | (message "%s" msdos-previous-message) | 277 | (message "%s" msdos-previous-message) |