120 |
:group 'tooltip) |
:group 'tooltip) |
121 |
|
|
122 |
(make-obsolete-variable 'tooltip-use-echo-area |
(make-obsolete-variable 'tooltip-use-echo-area |
123 |
"To display help tooltips in the echo area turn tooltip-mode off. |
"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 |
To display GUD tooltips in the echo area turn `gud-tooltip-mode' on and set |
125 |
gud-tooltip-echo-area to t." "22.1") |
`gud-tooltip-echo-area' to t." "22.1") |
126 |
|
|
127 |
|
|
128 |
;;; Variables that are not customizable. |
;;; Variables that are not customizable. |
201 |
(setq tooltip-timeout-id nil))) |
(setq tooltip-timeout-id nil))) |
202 |
|
|
203 |
(defun tooltip-start-delayed-tip () |
(defun tooltip-start-delayed-tip () |
204 |
"Add a one-shot timeout to call function tooltip-timeout." |
"Add a one-shot timeout to call function `tooltip-timeout'." |
205 |
(setq tooltip-timeout-id |
(setq tooltip-timeout-id |
206 |
(add-timeout (tooltip-delay) 'tooltip-timeout nil))) |
(add-timeout (tooltip-delay) 'tooltip-timeout nil))) |
207 |
|
|
208 |
(defun tooltip-timeout (object) |
(defun tooltip-timeout (object) |
209 |
"Function called when timer with id tooltip-timeout-id fires." |
"Function called when timer with id `tooltip-timeout-id' fires." |
210 |
(run-hook-with-args-until-success 'tooltip-hook |
(run-hook-with-args-until-success 'tooltip-hook |
211 |
tooltip-last-mouse-motion-event)) |
tooltip-last-mouse-motion-event)) |
212 |
|
|
301 |
|
|
302 |
(defun tooltip-process-prompt-regexp (process) |
(defun tooltip-process-prompt-regexp (process) |
303 |
"Return regexp matching the prompt of PROCESS at the end of a string. |
"Return regexp matching the prompt of PROCESS at the end of a string. |
304 |
The prompt is taken from the value of COMINT-PROMPT-REGEXP in the buffer |
The prompt is taken from the value of `comint-prompt-regexp' in |
305 |
of PROCESS." |
the buffer of PROCESS." |
306 |
(let ((prompt-regexp (save-excursion |
(let ((prompt-regexp (save-excursion |
307 |
(set-buffer (process-buffer process)) |
(set-buffer (process-buffer process)) |
308 |
comint-prompt-regexp))) |
comint-prompt-regexp))) |
349 |
(defun tooltip-help-tips (event) |
(defun tooltip-help-tips (event) |
350 |
"Hook function to display a help tooltip. |
"Hook function to display a help tooltip. |
351 |
This is installed on the hook `tooltip-hook', which is run when |
This is installed on the hook `tooltip-hook', which is run when |
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-use-echo-area) |
(tooltip-show tooltip-help-message tooltip-use-echo-area) |