]> code.delx.au - gnu-emacs/commitdiff
(tooltip-show-help-non-mode): Don't set tooltip-previous-message if
authorChong Yidong <cyd@stupidchicken.com>
Mon, 16 Mar 2009 02:42:45 +0000 (02:42 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 16 Mar 2009 02:42:45 +0000 (02:42 +0000)
called with the same tooltip that is showing (Bug#2680).

lisp/tooltip.el

index 41a50b442ea2f8640d3cc9178787633b63a72b1f..b7883a02049811452a6cc66787cb70312fab5a9d 100644 (file)
@@ -333,11 +333,13 @@ the buffer of PROCESS."
              (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)