changeset 102598:38cce541a3bd

(tooltip-show-help-non-mode): Don't set tooltip-previous-message if called with the same tooltip that is showing (Bug#2680).
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 16 Mar 2009 02:42:45 +0000
parents 01843ba0d6af
children 9c86a5cf583e
files lisp/tooltip.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tooltip.el	Mon Mar 16 02:42:33 2009 +0000
+++ b/lisp/tooltip.el	Mon Mar 16 02:42:45 2009 +0000
@@ -333,11 +333,13 @@
              (not cursor-in-echo-area)) ;Don't overwrite a prompt.
     (cond
      ((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)))
       (let ((message-truncate-lines t)
             (message-log-max nil))
-        (message "%s" (replace-regexp-in-string "\n" ", " help))))
+        (message "%s" help)))
      ((stringp tooltip-previous-message)
       (let ((message-log-max nil))
         (message "%s" tooltip-previous-message)