]> git.eshelyaron.com Git - emacs.git/commitdiff
(tooltip-x-offset, tooltip-y-offset): Mention in the
authorEli Zaretskii <eliz@gnu.org>
Mon, 22 Oct 2001 08:54:13 +0000 (08:54 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 22 Oct 2001 08:54:13 +0000 (08:54 +0000)
doc string the effect of `left' and `top' parameters in
tooltip-frame-parameters, the default values, and the units.
(tooltip-frame-parameters): Mention `top' and `left' in the doc
string.
(tooltip-show): Mention in the doc string the `top' and `left'
parameters in tooltip-frame-parameters, and x-max-tooltip-size.

lisp/ChangeLog
lisp/tooltip.el

index bcc3c9451f73d4699978365f323ee6e479d581d9..fa1279a226bbe44b12d91749a372f0e215ce9f28 100644 (file)
@@ -1,3 +1,13 @@
+2001-10-22  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * tooltip.el (tooltip-x-offset, tooltip-y-offset): Mention in the
+       doc string the effect of `left' and `top' parameters in
+       tooltip-frame-parameters, the default values, and the units.
+       (tooltip-frame-parameters): Mention `top' and `left' in the doc
+       string.
+       (tooltip-show): Mention in the doc string the `top' and `left'
+       parameters in tooltip-frame-parameters, and x-max-tooltip-size.
+
 2001-10-22  Andre Spiegel  <spiegel@gnu.org>
 
        Add autoscaling support for vc-annotate.
index 9fadd00334aa67ec4c239c18adcab497070c609c..1a6ef70094169bafcbebb12b730ae8a8669c08d4 100644 (file)
@@ -84,10 +84,14 @@ Do so after `tooltip-short-delay'."
 
 
 (defcustom tooltip-x-offset nil
-  "Specify an X offset for the display of tooltips.
+  "Specify an X offset, in pixels, for the display of tooltips.
 The offset is relative to the position of the mouse.  It must
 be chosen so that the tooltip window doesn't contain the mouse
-when it pops up."
+when it pops up.  If the value is nil, the default offset is 5
+pixels.
+
+If `tooltip-frame-parameters' includes the `left' parameter,
+the value of `tooltip-x-offset' is ignored."
   :tag "X offset"
   :type '(choice (const :tag "Default" nil)
                 (integer :tag "Offset" :value 1))
@@ -95,10 +99,14 @@ when it pops up."
 
 
 (defcustom tooltip-y-offset nil
-  "Specify an Y offset for the display of tooltips.
+  "Specify a Y offset, in pixels, for the display of tooltips.
 The offset is relative to the position of the mouse.  It must
 be chosen so that the tooltip window doesn't contain the mouse
-when it pops up."
+when it pops up.  If the value is nil, the default offset is -10
+pixels.
+
+If `tooltip-frame-parameters' includes the `top' parameter,
+the value of `tooltip-y-offset' is ignored."
   :tag "Y offset"
   :type '(choice (const :tag "Default" nil)
                 (integer :tag "Offset" :value 1))
@@ -109,7 +117,10 @@ when it pops up."
   '((name . "tooltip")
     (internal-border-width . 5)
     (border-width . 1))
-  "Frame parameters used for tooltips."
+  "Frame parameters used for tooltips.
+
+If `left' or `top' parameters are included, they specify the absolute
+position to pop up the tooltip."
   :type 'sexp
   :tag "Frame Parameters"
   :group 'tooltip)
@@ -330,7 +341,15 @@ change the existing association.  Value is the resulting alist."
 
 
 (defun tooltip-show (text)
-  "Show a tooltip window at the current mouse position displaying TEXT."
+  "Show a tooltip window displaying TEXT.
+
+Text larger than `x-max-tooltip-size' (which see) is clipped.
+
+If the alist in `tooltip-frame-parameters' includes `left' and `top'
+parameters, they determine the x and y position where the tooltip
+is displayed.  Otherwise, the tooltip pops at offsets specified by
+`tooltip-x-offset' and `tooltip-y-offset' from the current mouse
+position."
   (if tooltip-use-echo-area
       (message "%s" text)
     (condition-case error