aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann2000-11-18 12:56:26 +0000
committerGerd Moellmann2000-11-18 12:56:26 +0000
commite4df9b40fdbd25a907724c9b5f7b90d1022edfd5 (patch)
tree77735fbf9265090d25bd5c63304eebe0d2cd0019 /lisp
parent24127af0a0e790319c72c4d447b166b04efa4e89 (diff)
downloademacs-e4df9b40fdbd25a907724c9b5f7b90d1022edfd5.tar.gz
emacs-e4df9b40fdbd25a907724c9b5f7b90d1022edfd5.zip
(tooltip-x-offset, tooltip-y-offset): New user-options.
(tooltip-show): Use the offsets.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/tooltip.el29
1 files changed, 28 insertions, 1 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 5916df0273d..f5953f49c7e 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -76,6 +76,28 @@ Do so after `tooltip-short-delay'."
76 :group 'tooltip) 76 :group 'tooltip)
77 77
78 78
79(defcustom tooltip-x-offset nil
80 "Specify an X offset for the display of tooltips.
81The offset is relative to the position of the mouse. It must
82be chosen so that the tooltip window doesn't contain the mouse
83when it pops up."
84 :tag "X offset"
85 :type '(choice (const :tag "Default" nil)
86 (integer :tag "Offset" :value 1))
87 :group 'tooltip)
88
89
90(defcustom tooltip-y-offset nil
91 "Specify an Y offset for the display of tooltips.
92The offset is relative to the position of the mouse. It must
93be chosen so that the tooltip window doesn't contain the mouse
94when it pops up."
95 :tag "Y offset"
96 :type '(choice (const :tag "Default" nil)
97 (integer :tag "Offset" :value 1))
98 :group 'tooltip)
99
100
79(defcustom tooltip-frame-parameters 101(defcustom tooltip-frame-parameters
80 '((name . "tooltip") 102 '((name . "tooltip")
81 (foreground-color . "black") 103 (foreground-color . "black")
@@ -284,7 +306,12 @@ ACTIVATEP non-nil means activate mouse motion events."
284 "Show a tooltip window at the current mouse position displaying TEXT." 306 "Show a tooltip window at the current mouse position displaying TEXT."
285 (if tooltip-use-echo-area 307 (if tooltip-use-echo-area
286 (message "%s" text) 308 (message "%s" text)
287 (x-show-tip text (selected-frame) tooltip-frame-parameters))) 309 (x-show-tip text
310 (selected-frame)
311 tooltip-frame-parameters
312 nil
313 tooltip-x-offset
314 tooltip-y-offset)))
288 315
289(defun tooltip-hide (&optional ignored-arg) 316(defun tooltip-hide (&optional ignored-arg)
290 "Hide a tooltip, if one is displayed. 317 "Hide a tooltip, if one is displayed.