[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/tooltip.el,v
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/tooltip.el,v |
Date: |
Wed, 29 Oct 2008 12:10:35 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Juanma Barranquero <lektu> 08/10/29 12:10:34
Index: tooltip.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tooltip.el,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- tooltip.el 6 Sep 2008 21:29:40 -0000 1.88
+++ tooltip.el 29 Oct 2008 12:10:33 -0000 1.89
@@ -59,10 +59,10 @@
(if tooltip-mode
(progn
(add-hook 'pre-command-hook 'tooltip-hide)
- (add-hook 'tooltip-hook 'tooltip-help-tips))
+ (add-hook 'tooltip-functions 'tooltip-help-tips))
(unless (and (boundp 'gud-tooltip-mode) gud-tooltip-mode)
(remove-hook 'pre-command-hook 'tooltip-hide))
- (remove-hook 'tooltip-hook 'tooltip-help-tips))
+ (remove-hook 'tooltip-functions 'tooltip-help-tips))
(setq show-help-function
(if tooltip-mode 'tooltip-show-help 'tooltip-show-help-non-mode)))
@@ -146,10 +146,14 @@
;;; Variables that are not customizable.
-(defvar tooltip-hook nil
+(defvar tooltip-functions nil
"Functions to call to display tooltips.
-Each function is called with one argument EVENT which is a copy of
-the last mouse movement event that occurred.")
+Each function is called with one argument EVENT which is a copy
+of the last mouse movement event that occurred. If one of these
+functions displays the tooltip, it should return non-nil and the
+rest are not called.")
+
+(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1")
(defvar tooltip-timeout-id nil
"The id of the timeout started when Emacs becomes idle.")
@@ -193,7 +197,7 @@
(defun tooltip-timeout (object)
"Function called when timer with id `tooltip-timeout-id' fires."
- (run-hook-with-args-until-success 'tooltip-hook
+ (run-hook-with-args-until-success 'tooltip-functions
tooltip-last-mouse-motion-event))
@@ -338,7 +342,6 @@
(t
(message nil)))))
-
(defun tooltip-show-help (msg)
"Function installed as `show-help-function'.
MSG is either a help string to display, or nil to cancel the display."
@@ -360,8 +363,8 @@
(defun tooltip-help-tips (event)
"Hook function to display a help tooltip.
-This is installed on the hook `tooltip-hook', which is run when
-the timer with id `tooltip-timeout-id' fires.
+This is installed on the hook `tooltip-functions', which
+is run when the timer with id `tooltip-timeout-id' fires.
Value is non-nil if this function handled the tip."
(when (stringp tooltip-help-message)
(tooltip-show tooltip-help-message tooltip-use-echo-area)
- [Emacs-diffs] Changes to emacs/lisp/tooltip.el,v,
Juanma Barranquero <=