From 9bec41deccf2b08bcd81d0daa8c787b6b5a822f8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 16 Mar 2009 02:42:45 +0000 Subject: [PATCH] (tooltip-show-help-non-mode): Don't set tooltip-previous-message if called with the same tooltip that is showing (Bug#2680). --- lisp/tooltip.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 41a50b442ea..b7883a02049 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -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) -- 2.39.5