Mercurial > emacs
comparison lisp/tooltip.el @ 25332:c09e05be2f4b
(tooltip-mode): Customize this, per convention.
(tooltip-active): Option deleted.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 19 Aug 1999 18:35:29 +0000 |
parents | bb68fe3c72f8 |
children | 42b52d8b6703 |
comparison
equal
deleted
inserted
replaced
25331:d0672c9ba98a | 25332:c09e05be2f4b |
---|---|
1 ;;; tooltip.el --- Show tooltip windows | 1 ;;; tooltip.el --- Show tooltip windows |
2 | 2 |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997, 1999 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Gerd Moellmann <gerd@acm.org> | 5 ;; Author: Gerd Moellmann <gerd@acm.org> |
6 ;; Keywords: help c mouse tools | 6 ;; Keywords: help c mouse tools |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
47 "Customization group for the `tooltip' package." | 47 "Customization group for the `tooltip' package." |
48 :group 'help | 48 :group 'help |
49 :group 'c | 49 :group 'c |
50 :group 'mouse | 50 :group 'mouse |
51 :group 'tools | 51 :group 'tools |
52 :version "21.1" | |
52 :tag "Tool Tips") | 53 :tag "Tool Tips") |
53 | 54 |
55 (defvar tooltip-mode) | |
54 | 56 |
55 (defcustom tooltip-delay 1.0 | 57 (defcustom tooltip-delay 1.0 |
56 "Seconds to wait before displaying a tooltip the first time." | 58 "Seconds to wait before displaying a tooltip the first time." |
57 :tag "Delay" | 59 :tag "Delay" |
58 :type 'number | 60 :type 'number |
65 :type 'number | 67 :type 'number |
66 :group 'tooltip) | 68 :group 'tooltip) |
67 | 69 |
68 | 70 |
69 (defcustom tooltip-recent-seconds 1 | 71 (defcustom tooltip-recent-seconds 1 |
70 "Display tooltips after `tooltip-short-delay' if changing tip items | 72 "Display tooltips if changing tip items within this many seconds. |
71 within this many seconds." | 73 Do so after `tooltip-short-delay'." |
72 :tag "Recent seconds" | 74 :tag "Recent seconds" |
73 :type 'number | 75 :type 'number |
74 :group 'tooltip) | 76 :group 'tooltip) |
75 | 77 |
76 | 78 |
130 "A copy of the last mouse motion event seen.") | 132 "A copy of the last mouse motion event seen.") |
131 | 133 |
132 | 134 |
133 (defvar tooltip-hide-time nil | 135 (defvar tooltip-hide-time nil |
134 "Time when the last tooltip was hidden.") | 136 "Time when the last tooltip was hidden.") |
135 | |
136 | |
137 (defvar tooltip-mode nil | |
138 "Non-nil means tooltip mode is on.") | |
139 | 137 |
140 | 138 |
141 (defvar tooltip-gud-debugger nil | 139 (defvar tooltip-gud-debugger nil |
142 "The debugger for which we show tooltips.") | 140 "The debugger for which we show tooltips.") |
143 | 141 |
400 (sdb (concat expr "/")) | 398 (sdb (concat expr "/")) |
401 (perldb expr))) | 399 (perldb expr))) |
402 | 400 |
403 | 401 |
404 (defun tooltip-gud-tips (event) | 402 (defun tooltip-gud-tips (event) |
405 "Show tip for identifier or selection under the mouse. The mouse | 403 "Show tip for identifier or selection under the mouse. |
406 must either point at an identifier or inside a selected region for the | 404 The mouse must either point at an identifier or inside a selected |
407 tip window to be shown. If tooltip-gud-dereference is t, add a `*' in | 405 region for the tip window to be shown. If tooltip-gud-dereference is t, |
408 front of the printed expression. | 406 add a `*' in front of the printed expression. |
409 | 407 |
410 This function must return nil if it doesn't handle EVENT." | 408 This function must return nil if it doesn't handle EVENT." |
411 (let (gud-buffer process) | 409 (let (gud-buffer process) |
412 (when (and (eventp event) | 410 (when (and (eventp event) |
413 tooltip-gud-tips-p | 411 tooltip-gud-tips-p |
460 | 458 |
461 | 459 |
462 ;;; Do this after all functions have been defined that are called | 460 ;;; Do this after all functions have been defined that are called |
463 ;;; from `tooltip-mode'. | 461 ;;; from `tooltip-mode'. |
464 | 462 |
465 (defcustom tooltip-active nil | 463 |
466 "*Non-nil means tooltips are active." | 464 ;;;###autoload |
467 :tag "Activate tooltips" | 465 (defcustom tooltip-mode nil |
466 "Toggle tooltip-mode. | |
467 Setting this variable directly does not take effect; | |
468 use either \\[customize] or the function `tooltip-mode'." | |
469 :set (lambda (symbol value) | |
470 (tooltip-mode (or value 0))) | |
471 :initialize 'custom-initialize-default | |
468 :type 'boolean | 472 :type 'boolean |
469 :set #'(lambda (symbol value) | |
470 (set-default symbol value) | |
471 (tooltip-mode (or value 0))) | |
472 :require 'tooltip | 473 :require 'tooltip |
473 :group 'tooltip) | 474 :group 'tooltip) |
474 | 475 |
475 | 476 |
476 ;;; tooltip.el ends here | 477 ;;; tooltip.el ends here |