%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/tooltip.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307\306\310\306\311\306\312\313\314\315\316&\210\317\320\321\322\323\324\325\326\306\303\327\330&\207" [require syntax custom-declare-group tooltip nil "Customization group for the `tooltip' package." :group help gud mouse tools :version "21.1" :tag "Tool Tips" custom-declare-variable tooltip-mode t "Non-nil if Tooltip mode is enabled.\nSee the `tooltip-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `tooltip-mode'." :set custom-set-minor-mode :initialize custom-initialize-delay :type boolean] 16) #@518 Toggle Tooltip mode. If called interactively, enable Tooltip mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. When this global minor mode is enabled, Emacs displays help text (e.g. for buttons and menu items that you put the mouse on) in a pop-up window. When Tooltip mode is disabled, Emacs displays help text in the echo area, instead of making a pop-up window. (defalias 'tooltip-mode #[(&optional arg) "\306 \307\302 \310=\203 \311\302!?\202 \312 !\313V\"\210\n\2030 \314\315!\2030 \316\317\320\"\210\316\321\322\"\210\202D \323\303!\203: \204? \324\317\320\"\210\324\321\322\"\210\n\203L \325\202M \326\327\330\311\302!\203Z \331\202[ \332\"\210\333\334!\203\206 \335\302!\210\306 \203s \306 \232\203\206 \336\337\340\311\302!\203\201 \341\202\202 \342 #\210))\343 \210\311\302!\207" [#1=#:last-message arg tooltip-mode gud-tooltip-mode show-help-function local current-message set-default toggle default-value prefix-numeric-value 0 fboundp x-show-tip add-hook pre-command-hook tooltip-hide tooltip-functions tooltip-help-tips boundp remove-hook tooltip-show-help tooltip-show-help-non-mode run-hooks tooltip-mode-hook tooltip-mode-on-hook tooltip-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Tooltip mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 1103) (list (or current-prefix-arg 'toggle))]) (defvar tooltip-mode-hook nil) (byte-code "\303\304N\204\f \305\303\304\306#\210\307\310\311\312\300!\205 \311\211%\210\313\314\315\316\317\320\321\322&\210\313\323\324\325\317\320\321\322&\210\313\326\327\330\317\320\321\322&\210\313\331\332\333\317\320\321\322&\210\313\334\335\336\317\337\321\322&\210\313\340\341\342\317\337\321\322&\210\313\343\344\345\317\346\321\322\347\350& \210\351\322\352\353\321\322\321\354&\210\313\355\311\356\317\357\321\322&\210\360\355\361\362\363$\210\313\364\311\365\317\357\321\322\347\366& \210\367\370\371\311#\210\372\311\211\203\277 \n@\370 N\203\270 \371 N\204\270 \305\371 \370 N#\210\nA\211\204\241 *\360\370\371\373#\207" [tooltip-mode-map prop --dolist-tail-- tooltip-mode-hook variable-documentation put "Hook run after entering or leaving `tooltip-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode tooltip-mode nil boundp custom-declare-variable tooltip-delay 0.7 "Seconds to wait before displaying a tooltip the first time." :type number :group tooltip tooltip-short-delay 0.1 "Seconds to wait between subsequent tooltips on different items." tooltip-recent-seconds 1 "Display tooltips if changing tip items within this many seconds.\nDo so after `tooltip-short-delay'." tooltip-hide-delay 10 "Hide tooltips automatically after this many seconds." tooltip-x-offset 5 "X offset, in pixels, for the display of tooltips.\nThe offset is the distance between the X position of the mouse and\nthe left border of the tooltip window. It must be chosen so that the\ntooltip window doesn't contain the mouse when it pops up, or it may\ninterfere with clicking where you wish.\n\nIf `tooltip-frame-parameters' includes the `left' parameter,\nthe value of `tooltip-x-offset' is ignored." integer tooltip-y-offset 20 "Y offset, in pixels, for the display of tooltips.\nThe offset is the distance between the Y position of the mouse and\nthe top border of the tooltip window. It must be chosen so that the\ntooltip window doesn't contain the mouse when it pops up, or it may\ninterfere with clicking where you wish.\n\nIf `tooltip-frame-parameters' includes the `top' parameter,\nthe value of `tooltip-y-offset' is ignored." tooltip-frame-parameters '((name . "tooltip") (internal-border-width . 2) (border-width . 1) (no-special-glyphs . t)) "Frame parameters used for tooltips.\n\nIf `left' or `top' parameters are included, they specify the absolute\nposition to pop up the tooltip.\n\nNote that font and color parameters are ignored, and the attributes\nof the `tooltip' face are used instead." (repeat (cons :format "%v" (symbol :tag "Parameter") (sexp :tag "Value"))) :version "26.1" custom-declare-face ((((class color)) :background "lightyellow" :foreground "black" :inherit variable-pitch) (t :inherit variable-pitch)) "Face for tooltips.\n\nWhen using the GTK toolkit, this face will only be used if\n`x-gtk-use-system-tooltips' is non-nil." basic-faces tooltip-use-echo-area "Use the echo area instead of tooltip frames for help and GUD tooltips.\nThis variable is obsolete; instead of setting it to t, disable\n`tooltip-mode' (which has a similar effect)." boolean make-obsolete-variable "disable Tooltip mode instead" "24.1" set tooltip-resize-echo-area "If non-nil, using the echo area for tooltips will resize the echo area.\nBy default, when the echo area is used for displaying tooltips,\nthe tooltip text is truncated if it exceeds a single screen line.\nWhen this variable is non-nil, the text is not truncated; instead,\nthe echo area is resized as needed to accommodate the full text\nof the tooltip.\nThis variable has effect only on GUI frames." "27.1" defvaralias tooltip-hook tooltip-functions (saved-value saved-variable-comment) "23.1"] 11) #@255 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. If one of these functions displays the tooltip, it should return non-nil and the rest are not called. (defvar tooltip-functions nil (#$ . 6432)) #@56 The id of the timeout started when Emacs becomes idle. (defvar tooltip-timeout-id nil (#$ . 6735)) #@45 A copy of the last mouse motion event seen. (defvar tooltip-last-mouse-motion-event nil (#$ . 6840)) #@40 Time when the last tooltip was hidden. (defvar tooltip-hide-time nil (#$ . 6947)) #@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) "\302!\211@\262\211\205 \303 !)\207" [event window event-end window-buffer] 3 (#$ . 7036)]) #@51 Return the delay in seconds for the next tooltip. (defalias 'tooltip-delay #[nil "\203 \304\305! \"\203 \n\207\207" [tooltip-hide-time tooltip-recent-seconds tooltip-short-delay tooltip-delay time-less-p time-since] 3 (#$ . 7295)]) #@30 Disable the tooltip timeout. (defalias 'tooltip-cancel-delayed-tip #[nil "\205 \301!\210\302\211\207" [tooltip-timeout-id disable-timeout nil] 2 (#$ . 7538)]) #@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 (#$ . 7707)]) #@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-functions] 3 (#$ . 7928)]) #@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\n\203 \n\f\241\210\202 \fB\211 B\f\210* \207" [key alist #1=#:p value #2=#:v] 2 (#$ . 8156)]) (make-obsolete 'tooltip-set-param "use (setf (alist-get ..) ..) instead" "25.1") #@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 \306 !\207\3071\244 \310\n!\311\312\313\"\311\312\314\"\f;\203g \315 \236\f\2035 \241\210\202? \315B\211 B\210*\316 \236\f\203Y \241\210\202c \316B\211 B\210*;\203\220 \317 \236\203\202 \241\210\202\214 \317B\211 B\210*\320\321 \322\312#\323 !&+0\207\"\324\325\"\"\210\326\327!\210\324\330 \")\207" [use-echo-area text tooltip-frame-parameters bg fg params tooltip-show-help-non-mode (error) copy-sequence face-attribute tooltip :foreground :background foreground-color border-color background-color x-show-tip propertize face selected-frame message "Error while displaying tooltip: %s" sit-for 1 "%s" #1=#:p #2=#:v #3=#:p #4=#:v #5=#:p #6=#:v tooltip-hide-delay tooltip-x-offset tooltip-y-offset error] 7 (#$ . 8579)]) #@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 (#$ . 9882)]) #@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\303\304!\210`\305 \306\307!\206 \310\n8\206 \311\n8?\205- \312\304!\210` V\205- `{+\207" [point start pstate skip-syntax-backward "w_" syntax-ppss looking-at "[0-9]" 3 4 skip-syntax-forward] 2 (#$ . 10138)]) #@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) "r\302!q\210\303\304!!\305 \203' \306 X\205* \307 X\205* \306 \307 {\202* \310 !*\207" [event point tooltip-event-buffer posn-point event-end use-region-p region-beginning region-end tooltip-identifier-from-point] 3 (#$ . 10570)]) #@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) "r\303!q\210 )\304\n\305H\306U\203 \307\n\310\"\202 \311\312Q)\207" [process comint-prompt-regexp prompt-regexp process-buffer "\n*" 0 94 substring 1 "\\*" "$"] 4 (#$ . 11062)]) #@65 Return OUTPUT with any prompt of PROCESS stripped from its end. (defalias 'tooltip-strip-prompt #[(process output) "\303 \304\216\305\306 !\n\"\203 \307\n\310\211\224#\202 \n*\207" [save-match-data-internal process output match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match tooltip-process-prompt-regexp substring 0] 4 (#$ . 11459)]) #@128 The last help message received via `show-help-function'. This is used by `tooltip-show-help' and `tooltip-show-help-non-mode'. (defvar tooltip-help-message nil (#$ . 11854)) #@40 The previous content of the echo area. (defvar tooltip-previous-message nil (#$ . 12034)) #@135 Function installed as `show-help-function' when Tooltip mode is off. It is also called if Tooltip mode is on, for text-only displays. (defalias 'tooltip-show-help-non-mode #[(help) "\306 ?\205b ?\205b ;\203F \307\310\311 #\n\2042 \312 \313 \"\2042 ;\203/ \312\313 \"\2042 \313 \314 ?\206<