aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-06-14 21:13:28 +0000
committerNick Roberts2005-06-14 21:13:28 +0000
commit90aff7c61e0237008eba184ef01e06c8026cecfe (patch)
tree099432ce106b46442ecbad48db069740c3bf99ab
parent3da629bdb6bed0988acef6899fa1b3ad023baf18 (diff)
downloademacs-90aff7c61e0237008eba184ef01e06c8026cecfe.tar.gz
emacs-90aff7c61e0237008eba184ef01e06c8026cecfe.zip
* tooltip.el (tooltip-use-echo-area): Restore from gud.el for
backward compatibility and make obsolete. (tooltip-help-tips): Use tooltip-use-echo-area. (tooltip-show-help-function): Rename to... (tooltip-show-help): ...this, because it is a function. (tooltip-mode, tooltip-help-message): Call tooltip-show-help.
-rw-r--r--lisp/tooltip.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 7a2865b9dfa..904f2bf8770 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -113,6 +113,17 @@ position to pop up the tooltip."
113 "Face for tooltips." 113 "Face for tooltips."
114 :group 'tooltip) 114 :group 'tooltip)
115 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.
124To display GUD tooltips in the echo area turn gud-tooltip-mode on and set
125gud-tooltip-echo-area to t." "22.1")
126
116 127
117;;; Variables that are not customizable. 128;;; Variables that are not customizable.
118 129
@@ -169,7 +180,7 @@ With ARG, turn tooltip mode on if and only if ARG is positive."
169 (remove-hook 'pre-command-hook 'tooltip-hide)) 180 (remove-hook 'pre-command-hook 'tooltip-hide))
170 (remove-hook 'tooltip-hook 'tooltip-help-tips)) 181 (remove-hook 'tooltip-hook 'tooltip-help-tips))
171 (setq show-help-function 182 (setq show-help-function
172 (if tooltip-mode 'tooltip-show-help-function nil))) 183 (if tooltip-mode 'tooltip-show-help nil)))
173 184
174 185
175;;; Timeout for tooltip display 186;;; Timeout for tooltip display
@@ -314,9 +325,9 @@ of PROCESS."
314;;; Tooltip help. 325;;; Tooltip help.
315 326
316(defvar tooltip-help-message nil 327(defvar tooltip-help-message nil
317 "The last help message received via `tooltip-show-help-function'.") 328 "The last help message received via `tooltip-show-help'.")
318 329
319(defun tooltip-show-help-function (msg) 330(defun tooltip-show-help (msg)
320 "Function installed as `show-help-function'. 331 "Function installed as `show-help-function'.
321MSG is either a help string to display, or nil to cancel the display." 332MSG is either a help string to display, or nil to cancel the display."
322 (let ((previous-help tooltip-help-message)) 333 (let ((previous-help tooltip-help-message))
@@ -341,7 +352,7 @@ This is installed on the hook `tooltip-hook', which is run when
341the timer with ID `tooltip-timeout-id' fires. 352the timer with ID `tooltip-timeout-id' fires.
342Value is non-nil if this function handled the tip." 353Value is non-nil if this function handled the tip."
343 (when (stringp tooltip-help-message) 354 (when (stringp tooltip-help-message)
344 (tooltip-show tooltip-help-message) 355 (tooltip-show tooltip-help-message tooltip-use-echo-area)
345 t)) 356 t))
346 357
347(provide 'tooltip) 358(provide 'tooltip)