113 |
"Face for tooltips." |
"Face for tooltips." |
114 |
:group 'tooltip) |
:group 'tooltip) |
115 |
|
|
116 |
|
(defcustom tooltip-use-echo-area nil |
117 |
|
"Use the echo area instead of tooltip frames for help and GUD tooltips." |
118 |
|
:type 'boolean |
119 |
|
:tag "Use echo area" |
120 |
|
:group 'tooltip) |
121 |
|
|
122 |
|
(make-obsolete-variable 'tooltip-use-echo-area |
123 |
|
"To display help tooltips in the echo area turn tooltip-mode off. |
124 |
|
To display GUD tooltips in the echo area turn gud-tooltip-mode on and set |
125 |
|
gud-tooltip-echo-area to t." "22.1") |
126 |
|
|
127 |
|
|
128 |
;;; Variables that are not customizable. |
;;; Variables that are not customizable. |
129 |
|
|
180 |
(remove-hook 'pre-command-hook 'tooltip-hide)) |
(remove-hook 'pre-command-hook 'tooltip-hide)) |
181 |
(remove-hook 'tooltip-hook 'tooltip-help-tips)) |
(remove-hook 'tooltip-hook 'tooltip-help-tips)) |
182 |
(setq show-help-function |
(setq show-help-function |
183 |
(if tooltip-mode 'tooltip-show-help-function nil))) |
(if tooltip-mode 'tooltip-show-help nil))) |
184 |
|
|
185 |
|
|
186 |
;;; Timeout for tooltip display |
;;; Timeout for tooltip display |
325 |
;;; Tooltip help. |
;;; Tooltip help. |
326 |
|
|
327 |
(defvar tooltip-help-message nil |
(defvar tooltip-help-message nil |
328 |
"The last help message received via `tooltip-show-help-function'.") |
"The last help message received via `tooltip-show-help'.") |
329 |
|
|
330 |
(defun tooltip-show-help-function (msg) |
(defun tooltip-show-help (msg) |
331 |
"Function installed as `show-help-function'. |
"Function installed as `show-help-function'. |
332 |
MSG is either a help string to display, or nil to cancel the display." |
MSG is either a help string to display, or nil to cancel the display." |
333 |
(let ((previous-help tooltip-help-message)) |
(let ((previous-help tooltip-help-message)) |
352 |
the timer with ID `tooltip-timeout-id' fires. |
the timer with ID `tooltip-timeout-id' fires. |
353 |
Value is non-nil if this function handled the tip." |
Value is non-nil if this function handled the tip." |
354 |
(when (stringp tooltip-help-message) |
(when (stringp tooltip-help-message) |
355 |
(tooltip-show tooltip-help-message) |
(tooltip-show tooltip-help-message tooltip-use-echo-area) |
356 |
t)) |
t)) |
357 |
|
|
358 |
(provide 'tooltip) |
(provide 'tooltip) |