;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:21:12 2007 ;;; from file /home/cyd/emacs/lisp/tooltip.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`tooltip.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'tooltip nil "Customization group for the `tooltip' package." :group 'help :group 'gud :group 'mouse :group 'tools :version "21.1" :tag "Tool Tips") #@257 Non-nil if Tooltip mode is enabled. See the command `tooltip-mode' for a description of this minor-mode. Setting this variable directly does not take effect; either customize it (see the info node `Easy Customization') or call the function `tooltip-mode'. (custom-declare-variable 'tooltip-mode '(not (or noninteractive emacs-basic-display (not (display-graphic-p)) (not (fboundp 'x-show-tip)))) '(#$ . 733) :set 'custom-set-minor-mode :initialize 'custom-initialize-safe-default :group 'tooltip :type 'boolean) #@443 Toggle Tooltip mode. With ARG, turn Tooltip mode on if and only if ARG is positive. When this minor mode is enabled, Emacs displays help text in a pop-up window for buttons and menu items that you put the mouse on. (However, if `tooltip-use-echo-area' is non-nil, this and all pop-up help appears in the echo area.) When Tooltip mode is disabled, Emacs displays one line of the help text in the echo area, and does not make a pop-up window. (defalias 'tooltip-mode #[(&optional arg) "\304=\203 ?\202%\203\305!\306V\202% \204\307\202%\310\311\301\"\210\312\211\2034\313\314!\2044\315\316!\210 \203E\317\320\321\"\210\317\322\323\"\210\202Y\324\302!\203O\n\204T\325\320\321\"\210\325\322\323\"\210 \205^\326\327\330 \203i\331\202j\332\"\210\333 \203\202\334\301!\210\310\335 \203\336\202\200\337\"\210\340 \210 \207" [arg tooltip-mode gud-tooltip-mode show-help-function toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil fboundp x-show-tip error "Sorry, tooltips are not yet available on this system" add-hook pre-command-hook tooltip-hide tooltip-hook tooltip-help-tips boundp remove-hook tooltip-show-help run-hooks tooltip-mode-hook tooltip-mode-on-hook tooltip-mode-off-hook called-interactively-p customize-mark-as-set "Tooltip mode %sabled" "en" "dis" force-mode-line-update] 4 (#$ . 1252) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\207" [add-minor-mode tooltip-mode nil boundp tooltip-mode-map] 5) #@61 Seconds to wait before displaying a tooltip the first time. (custom-declare-variable 'tooltip-delay '0.7 '(#$ . 2780) :type 'number :group 'tooltip) #@65 Seconds to wait between subsequent tooltips on different items. (custom-declare-variable 'tooltip-short-delay '0.1 '(#$ . 2935) :type 'number :group 'tooltip) #@101 Display tooltips if changing tip items within this many seconds. Do so after `tooltip-short-delay'. (custom-declare-variable 'tooltip-recent-seconds '1 '(#$ . 3101) :type 'number :group 'tooltip) #@54 Hide tooltips automatically after this many seconds. (custom-declare-variable 'tooltip-hide-delay '10 '(#$ . 3303) :type 'number :group 'tooltip) #@402 X offset, in pixels, for the display of tooltips. The offset is the distance between the X position of the mouse and the left border of the tooltip window. It must be chosen so that the tooltip window doesn't contain the mouse when it pops up, or it may interfere with clicking where you wish. If `tooltip-frame-parameters' includes the `left' parameter, the value of `tooltip-x-offset' is ignored. (custom-declare-variable 'tooltip-x-offset '5 '(#$ . 3456) :type 'integer :group 'tooltip) #@400 Y offset, in pixels, for the display of tooltips. The offset is the distance between the Y position of the mouse and the top border of the tooltip window. It must be chosen so that the tooltip window doesn't contain the mouse when it pops up, or it may interfere with clicking where you wish. If `tooltip-frame-parameters' includes the `top' parameter, the value of `tooltip-y-offset' is ignored. (custom-declare-variable 'tooltip-y-offset '20 '(#$ . 3955) :type 'integer :group 'tooltip) #@140 Frame parameters used for tooltips. If `left' or `top' parameters are included, they specify the absolute position to pop up the tooltip. (custom-declare-variable 'tooltip-frame-parameters ''((name . "tooltip") (internal-border-width . 2) (border-width . 1)) '(#$ . 4453) :type 'sexp :group 'tooltip) (custom-declare-face 'tooltip '((((class color)) :background "lightyellow" :foreground "black" :inherit variable-pitch) (t :inherit variable-pitch)) "Face for tooltips." :group 'tooltip :group 'basic-faces) #@163 Use the echo area instead of tooltip frames for help and GUD tooltips. To display multi-line help text in the echo area, set this to t and enable `tooltip-mode'. (custom-declare-variable 'tooltip-use-echo-area 'nil '(#$ . 4969) :type 'boolean :group 'tooltip) #@152 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. (defvar tooltip-hook nil (#$ . 5236)) #@56 The id of the timeout started when Emacs becomes idle. (defvar tooltip-timeout-id nil (#$ . 5431)) #@45 A copy of the last mouse motion event seen. (defvar tooltip-last-mouse-motion-event nil (#$ . 5536)) #@40 Time when the last tooltip was hidden. (defvar tooltip-hide-time nil (#$ . 5643)) #@116 Return the buffer over which event EVENT occurred. This might return nil if the event did not occur over a buffer. (defalias 'tooltip-event-buffer #[(event) "\211:\203\3038:\203\303\202\3048\202\305 `\306\307F)\307 8)\211\205,\310\n!)\207" [event position window 2 1 selected-window (0 . 0) 0 window-buffer] 5 (#$ . 5732)]) #@51 Return the delay in seconds for the next tooltip. (defalias 'tooltip-delay #[nil "\306  \203 Z\fW\203 \n*\207" [tooltip-delay now delay tooltip-hide-time tooltip-recent-seconds tooltip-short-delay float-time] 2 (#$ . 6077)]) #@30 Disable the tooltip timeout. (defalias 'tooltip-cancel-delayed-tip #[nil "\205 \301!\210\302\211\207" [tooltip-timeout-id disable-timeout nil] 2 (#$ . 6317)]) #@60 Add a one-shot timeout to call function `tooltip-timeout'. (defalias 'tooltip-start-delayed-tip #[nil "\301\302 \303\304#\211\207" [tooltip-timeout-id add-timeout tooltip-delay tooltip-timeout nil] 4 (#$ . 6486)]) #@64 Function called when timer with id `tooltip-timeout-id' fires. (defalias 'tooltip-timeout #[(object) "\301\302\"\207" [tooltip-last-mouse-motion-event run-hook-with-args-until-success tooltip-hook] 3 (#$ . 6707)]) #@177 Change the value of KEY in alist ALIST to VALUE. If there's no association for KEY in ALIST, add one, otherwise change the existing association. Value is the resulting alist. (defalias 'tooltip-set-param #[(alist key value) " \236\211:\203\n \241\210\202 B B )\207" [key alist param value] 3 (#$ . 6929)]) #@448 Show a tooltip window displaying TEXT. Text larger than `x-max-tooltip-size' 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. Optional second arg USE-ECHO-AREA non-nil means to show tooltip in echo area. (defalias 'tooltip-show #[(text &optional use-echo-area) "\203 \302\303 \"\207\304\305\306\217\207" [use-echo-area text message "%s" error (byte-code "\306!\307\310\311\"\307\310\312\"\n;\203\313 \314\n#\313 \315\n# ;\203*\313 \316 #\317\320\f\321\310#\322 &+\207" [tooltip-frame-parameters bg fg params text tooltip-hide-delay copy-sequence face-attribute tooltip :foreground :background tooltip-set-param foreground-color border-color background-color x-show-tip propertize face selected-frame tooltip-x-offset tooltip-y-offset] 7) ((error (byte-code "\302\303\"\210\304\305!\210\302\306 \"\207" [error text message "Error while displaying tooltip: %s" sit-for 1 "%s"] 3)))] 3 (#$ . 7251)]) #@76 Hide a tooltip, if one is displayed. Value is non-nil if tooltip was open. (defalias 'tooltip-hide #[(&optional ignored-arg) "\301 \210\302 \205\f\303 \211\207" [tooltip-hide-time tooltip-cancel-delayed-tip x-hide-tip float-time] 2 (#$ . 8417)]) #@150 Extract the identifier at POINT, if any. Value is nil if no identifier exists at point. Identifier extraction is based on the current syntax table. (defalias 'tooltip-identifier-from-point #[(point) "\212b\210\302\303!\210`\304\305!?\205\306\303!\210` V\205 `{*\207" [point start skip-syntax-backward "w_" looking-at "[0-9]" skip-syntax-forward] 2 (#$ . 8672)]) #@53 Value is non-nil if the region is currently active. (defalias 'tooltip-region-active-p '(macro . #[nil "\300\301\302 \"\203\n\303\207\304\207" [string-match "^GNU" emacs-version (and transient-mark-mode mark-active) (region-active-p)] 3 (#$ . 9047)])) #@207 Return an expression that should be printed for EVENT. If a region is active and the mouse is inside the region, print the region. Otherwise, figure out the identifier around the point where the mouse is. (defalias 'tooltip-expr-to-print #[(event) "\212\305!q\210\211:\203\3068:\203\306\202\3078\202$\310 `\311\312F)\313 8\206=\307 8:\203:\307 8@\202=\307 8) \203]\f\203]\314 \nX\205`\n\315 X\205`\314 \315 {\202`\316\n!*\207" [event position point transient-mark-mode mark-active tooltip-event-buffer 2 1 selected-window (0 . 0) 0 5 region-beginning region-end tooltip-identifier-from-point] 5 (#$ . 9307)]) #@157 Return regexp matching the prompt of PROCESS at the end of a string. The prompt is taken from the value of `comint-prompt-regexp' in the buffer of PROCESS. (defalias 'tooltip-process-prompt-regexp #[(process) "\212\303!q\210 )\211\304H\305U\203\n\306\307O\202\310\311\n\312Q)\207" [process comint-prompt-regexp prompt-regexp process-buffer 0 94 1 nil "\\*" "\n*" "$"] 4 (#$ . 9946)]) #@65 Return OUTPUT with any prompt of PROCESS stripped from its end. (defalias 'tooltip-strip-prompt #[(process output) "\304!\305 \306\216\307 \"\203 \310\211\224O* )\207" [process prompt-regexp save-match-data-internal output tooltip-process-prompt-regexp match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) string-match 0] 3 (#$ . 10344)]) #@57 The last help message received via `tooltip-show-help'. (defvar tooltip-help-message nil (#$ . 10740)) #@115 Function installed as `show-help-function'. MSG is either a help string to display, or nil to cancel the display. (defalias 'tooltip-show-help #[(msg) "\n\n\204 \303 \202 \n\232\206\303 \210\304 )\207" [tooltip-help-message previous-help msg tooltip-hide tooltip-start-delayed-tip] 2 (#$ . 10850)]) #@203 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. Value is non-nil if this function handled the tip. (defalias 'tooltip-help-tips #[(event) ";\205 \302 \"\210\303\207" [tooltip-help-message tooltip-use-echo-area tooltip-show t] 3 (#$ . 11164)]) (provide 'tooltip)