summaryrefslogtreecommitdiff
path: root/lisp/tooltip.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-12-14 10:35:22 +0000
committerGerd Moellmann <gerd@gnu.org>2000-12-14 10:35:22 +0000
commite56031492e42b2c6a7f2c6e35b0e5b717208ad2b (patch)
treeabf169e218b5e0420220f235b4c8cf86844a5d4e /lisp/tooltip.el
parenta924cf63b23b1124f991f798a0e782ceb6fb9700 (diff)
downloademacs-e56031492e42b2c6a7f2c6e35b0e5b717208ad2b.tar.gz
(tooltip-show): If an error is signaled in
x-show-tip, display that error, and display the help in the echo area.
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r--lisp/tooltip.el18
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 9ad338418c2..dada23d0c2e 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -308,12 +308,18 @@ ACTIVATEP non-nil means activate mouse motion events."
"Show a tooltip window at the current mouse position displaying TEXT."
(if tooltip-use-echo-area
(message "%s" text)
- (x-show-tip text
- (selected-frame)
- tooltip-frame-parameters
- nil
- tooltip-x-offset
- tooltip-y-offset)))
+ (condition-case error
+ (x-show-tip text
+ (selected-frame)
+ tooltip-frame-parameters
+ nil
+ tooltip-x-offset
+ tooltip-y-offset)
+ (error
+ (message "Error while displaying tooltip: %s" error)
+ (sit-for 1)
+ (message "%s" text)))))
+
(defun tooltip-hide (&optional ignored-arg)
"Hide a tooltip, if one is displayed.