diff options
| author | Chong Yidong | 2009-04-06 23:52:41 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-04-06 23:52:41 +0000 |
| commit | 707731ee86e8f6caed52cb94384f99abb6566d8d (patch) | |
| tree | 1e429472131f135bf07948f4b20fc5e473a7b1c9 | |
| parent | d7ca410a967371ec80979dda5850bdab4543036d (diff) | |
| download | emacs-707731ee86e8f6caed52cb94384f99abb6566d8d.tar.gz emacs-707731ee86e8f6caed52cb94384f99abb6566d8d.zip | |
* tooltip.el (tooltip-show-help-non-mode): Don't save the last
message if it was also a help message (Bug#2895).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/tooltip.el | 15 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7639ed724bd..37e9a9284cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-04-06 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * tooltip.el (tooltip-show-help-non-mode): Don't save the last | ||
| 4 | message if it was also a help message (Bug#2895). | ||
| 5 | |||
| 1 | 2009-04-06 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 6 | 2009-04-06 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
| 2 | 7 | ||
| 3 | * textmodes/bibtex.el (bibtex-format-entry) | 8 | * textmodes/bibtex.el (bibtex-format-entry) |
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index b7883a02049..918c955dfaf 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el | |||
| @@ -319,7 +319,9 @@ the buffer of PROCESS." | |||
| 319 | ;;; Tooltip help. | 319 | ;;; Tooltip help. |
| 320 | 320 | ||
| 321 | (defvar tooltip-help-message nil | 321 | (defvar tooltip-help-message nil |
| 322 | "The last help message received via `tooltip-show-help'.") | 322 | "The last help message received via `show-help-function'. |
| 323 | This is used by `tooltip-show-help' and | ||
| 324 | `tooltip-show-help-non-mode'.") | ||
| 323 | 325 | ||
| 324 | (defvar tooltip-previous-message nil | 326 | (defvar tooltip-previous-message nil |
| 325 | "The previous content of the echo area.") | 327 | "The previous content of the echo area.") |
| @@ -327,16 +329,17 @@ the buffer of PROCESS." | |||
| 327 | (defun tooltip-show-help-non-mode (help) | 329 | (defun tooltip-show-help-non-mode (help) |
| 328 | "Function installed as `show-help-function' when tooltip is off." | 330 | "Function installed as `show-help-function' when tooltip is off." |
| 329 | (when (and (not (window-minibuffer-p)) ;Don't overwrite minibuffer contents. | 331 | (when (and (not (window-minibuffer-p)) ;Don't overwrite minibuffer contents. |
| 330 | ;; Don't know how to reproduce it in Elisp: | 332 | (not cursor-in-echo-area)) ;Don't overwrite a prompt. |
| 331 | ;; Don't overwrite a keystroke echo. | ||
| 332 | ;; (NILP (echo_message_buffer) || ok_to_overwrite_keystroke_echo) | ||
| 333 | (not cursor-in-echo-area)) ;Don't overwrite a prompt. | ||
| 334 | (cond | 333 | (cond |
| 335 | ((stringp help) | 334 | ((stringp help) |
| 336 | (setq help (replace-regexp-in-string "\n" ", " help)) | 335 | (setq help (replace-regexp-in-string "\n" ", " help)) |
| 337 | (unless (or tooltip-previous-message | 336 | (unless (or tooltip-previous-message |
| 338 | (string-equal help (current-message))) | 337 | (string-equal help (current-message)) |
| 338 | (and (stringp tooltip-help-message) | ||
| 339 | (string-equal tooltip-help-message | ||
| 340 | (current-message)))) | ||
| 339 | (setq tooltip-previous-message (current-message))) | 341 | (setq tooltip-previous-message (current-message))) |
| 342 | (setq tooltip-help-message help) | ||
| 340 | (let ((message-truncate-lines t) | 343 | (let ((message-truncate-lines t) |
| 341 | (message-log-max nil)) | 344 | (message-log-max nil)) |
| 342 | (message "%s" help))) | 345 | (message "%s" help))) |