Commit 9bec41de authored by Chong Yidong's avatar Chong Yidong
Browse files

(tooltip-show-help-non-mode): Don't set tooltip-previous-message if

called with the same tooltip that is showing (Bug#2680).
parent 17bc3e84
...@@ -333,11 +333,13 @@ the buffer of PROCESS." ...@@ -333,11 +333,13 @@ the buffer of PROCESS."
(not cursor-in-echo-area)) ;Don't overwrite a prompt. (not cursor-in-echo-area)) ;Don't overwrite a prompt.
(cond (cond
((stringp help) ((stringp help)
(unless tooltip-previous-message (setq help (replace-regexp-in-string "\n" ", " help))
(unless (or tooltip-previous-message
(string-equal help (current-message)))
(setq tooltip-previous-message (current-message))) (setq tooltip-previous-message (current-message)))
(let ((message-truncate-lines t) (let ((message-truncate-lines t)
(message-log-max nil)) (message-log-max nil))
(message "%s" (replace-regexp-in-string "\n" ", " help)))) (message "%s" help)))
((stringp tooltip-previous-message) ((stringp tooltip-previous-message)
(let ((message-log-max nil)) (let ((message-log-max nil))
(message "%s" tooltip-previous-message) (message "%s" tooltip-previous-message)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment