;ELC
|
;;; Compiled
|
;;; in Emacs version 26.1
|
;;; with all optimizations.
|
|
;;; This file contains utf-8 non-ASCII characters,
|
;;; and so cannot be loaded into Emacs 22 or earlier.
|
(and (boundp 'emacs-version)
|
(< (aref emacs-version (1- (length emacs-version))) ?A)
|
(string-lessp emacs-version "23")
|
(error "`%s' was compiled for Emacs 23 or later" #$))
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
(defconst pos-tip-version "0.4.6")
|
(byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314\315\304\301&\210\310\316\317\320\314\315\304\301&\210\310\321\302\322\314\323\304\301&\210\310\324\302\325\314\326\304\301&\210\310\327\302\330\314\331\304\301&\210\310\332\302\333\314\334\304\301&\207" [custom-declare-group pos-tip nil "Show tooltip at point" :group faces :prefix "pos-tip-" custom-declare-variable pos-tip-border-width 1 "Outer border width of pos-tip's tooltip." :type integer pos-tip-internal-border-width 2 "Text margin of pos-tip's tooltip." pos-tip-foreground-color "Default foreground color of pos-tip's tooltip.\nWhen `nil', look up the foreground color of the `tooltip' face." (choice (const :tag "Default" nil) string) pos-tip-background-color "Default background color of pos-tip's tooltip.\nWhen `nil', look up the background color of the `tooltip' face." (choice (const :tag "Default" nil) string) pos-tip-tab-width "Tab width used for `pos-tip-split-string' and `pos-tip-fill-string'\nto expand tab characters. nil means use default value of `tab-width'." (choice (const :tag "Default" nil) integer) pos-tip-use-relative-coordinates "Non-nil means tooltip location is calculated as a coordinates\nrelative to the top left corner of frame. In this case the tooltip\nwill always be displayed within the frame.\n\nNote that this variable is automatically set to non-nil if absolute\ncoordinates can't be obtained by `pos-tip-compute-pixel-position'." boolean] 8)
|
#@228 The name of the window system that FRAME is displaying through.
|
The value is a symbol---for instance, 'x' for X windows.
|
The value is nil if Emacs is using a text-only terminal.
|
|
FRAME defaults to the currently selected frame.
|
(defalias 'pos-tip-window-system #[(&optional frame) "\302\206 \303 !\211\203 \304=?\205 \202 \305\306\302D\")\207" [frame type framep selected-frame t signal wrong-type-argument] 5 (#$ . 1913)])
|
#@128 Return a Nth power of 2 if OBJECT is a positive integer.
|
Otherwise return 0. Omitting N means return 1 for a positive integer.
|
(defalias 'pos-tip-normalize-natnum #[(object &optional n) "\302\303!\203 \304V\203 \305\202 \304 \206 \304\"\207" [object n ash natnump 0 1] 3 (#$ . 2352)])
|
#@60 The latest result of `pos-tip-frame-top-left-coordinates'.
|
(defvar pos-tip-saved-frame-coordinates '(0 . 0) (#$ . 2649))
|
#@108 The latest result of `pos-tip-calibrate-frame-offset'. This value
|
is used for non-X graphical environment.
|
(defvar pos-tip-frame-offset nil (#$ . 2777))
|
#@308 Array of the results of `pos-tip-calibrate-frame-offset'. They are
|
recorded only when `pos-tip-frame-top-left-coordinates' is called for a
|
non-X but graphical frame.
|
|
The 2nd and 4th elements are the values for frames having a menu bar.
|
The 3rd and 4th elements are the values for frames having a tool bar.
|
(defvar pos-tip-frame-offset-array [nil nil nil nil] (#$ . 2937))
|
#@346 Return the pixel coordinates of FRAME as a cons cell (LEFT . TOP),
|
which are relative to top left corner of screen.
|
|
Return nil if failing to acquire the coordinates.
|
|
If FRAME is omitted, use selected-frame.
|
|
Users can also get the frame coordinates by referring the variable
|
`pos-tip-saved-frame-coordinates' just after calling this function.
|
(defalias 'pos-tip-frame-top-left-coordinates #[(&optional frame) "\306!\211\204 \307\310\"\202\240 \311=\203a \3121\\ r\313\314!q\210\315\316 \210\317 \210\320\315\321\315\f\322\323\324\325\"\324\326\"#&\210eb\210\327\330!\210\331\332\327\333!\334 \"!\331\332\327\335!\334 \"!B\211*0\202\240 \210\315\202\240 \336\324\337\"\340\"\336\324\341\"\342\"\\'('H\206\202 ('\343!I\211)\205\237 \344\324\345\"!)@\\\344\324\346\"!)A\\B\211*)\207" [frame winsys case-fold-search shell-file-name shell-command-switch pos-tip-saved-frame-coordinates pos-tip-window-system error "text-only frame: %S" x (error) get-buffer-create " *xwininfo*" nil buffer-disable-undo erase-buffer call-process t format "xwininfo -display %s -id %s" frame-parameter display window-id search-forward "\n Absolute" string-to-number buffer-substring-no-properties "X: " line-end-position "Y: " pos-tip-normalize-natnum menu-bar-lines 0 tool-bar-lines 1 pos-tip-calibrate-frame-offset eval left top index pos-tip-frame-offset-array offset] 13 (#$ . 3317)])
|
#@370 Return the pixel coordinates of FRAME1 relative to FRAME2
|
as a cons cell (LEFT . TOP).
|
|
W32-FRAME non-nil means both of frames are under `w32' window system.
|
|
FRAME-COORD1 and FRAME-COORD2, if given, specify the absolute
|
coordinates of FRAME1 and FRAME2, respectively, which make the
|
calculations faster if the frames have different heights of menu bars
|
and tool bars.
|
(defalias 'pos-tip-frame-relative-position #[(frame1 frame2 &optional w32-frame frame-coord1 frame-coord2) "\306\307\310\"!\306\307 \310\"!=\203@ \n\204$ \306\307\311\"!\306\307 \311\"!=\203@ \312\307\313\"!\312\307 \313\"!Z\312\307\314\"!\312\307 \314\"!ZB\207\204K \315\316!) \204V \315\316 !)@ @ZA AZB\207" [frame1 frame2 w32-frame frame-coord1 pos-tip-saved-frame-coordinates frame-coord2 pos-tip-normalize-natnum frame-parameter menu-bar-lines tool-bar-lines eval left top nil pos-tip-frame-top-left-coordinates] 6 (#$ . 4717)])
|
#@129 Non-nil indicates the latest result of `pos-tip-compute-pixel-position'
|
was upper than the location specified by the arguments.
|
(defvar pos-tip-upperside-p nil (#$ . 5639))
|
#@150 Display pixel size effective for showing tooltip in MS-Windows desktop.
|
This doesn't include the taskbar area, so isn't same as actual display size.
|
(defvar pos-tip-w32-saved-max-width-height nil (#$ . 5819))
|
#@1765 Return pixel position of POS in WINDOW like (X . Y), which indicates
|
the absolute or relative coordinates of bottom left corner of the object.
|
|
Omitting POS and WINDOW means use current position and selected window,
|
respectively.
|
|
If PIXEL-WIDTH and PIXEL-HEIGHT are given, this function assumes these
|
values as the size of small window like tooltip which is located around the
|
object at POS. These values are used to adjust the location in order that
|
the tooltip won't disappear by sticking out of the display. By referring
|
the variable `pos-tip-upperside-p' after calling this function, user can
|
examine whether the tooltip will be located above the specified position.
|
|
If FRAME-COORDINATES is omitted or nil, automatically obtain the absolute
|
coordinates of the top left corner of frame which WINDOW is on. Here,
|
`top left corner of frame' represents the origin of `window-pixel-edges'
|
and its coordinates are essential for calculating the return value as
|
absolute coordinates. If a cons cell like (LEFT . TOP), specifies the
|
frame absolute location and makes the calculation slightly faster, but can
|
be used only when it's clear that frame is in the specified position. Users
|
can get the latest values of frame coordinates for using in the next call
|
by referring the variable `pos-tip-saved-frame-coordinates' just after
|
calling this function. Otherwise, FRAME-COORDINATES `relative' means return
|
pixel coordinates of the object relative to the top left corner of the frame.
|
This is the same effect as `pos-tip-use-relative-coordinates' is non-nil.
|
|
DX specifies horizontal offset in pixel.
|
|
DY specifies vertical offset in pixel. This makes the calculations done
|
without considering the height of object at POS, so the object might be
|
hidden by the tooltip.
|
(defalias 'pos-tip-compute-pixel-position #[(&optional pos window pixel-width pixel-height frame-coordinates dx dy) "\306\206 \307 !\310 !\311=\206 \f\312=\206 \n\205 ?\211\n\203) \313\2029 \f\2069 \314 !\2069 \315\211\n\316'\317(\206D \320!\")\321)!A\211*\205f \322*\"\206f \323\315!\205f \322*\"+)\3248\262\206\221 \325(\206{ \320!\315#\211,\205\214 ,@,A@B)\206\221 \326-\327'@\330!@-@.\206\244 \331$/\327'A\332!A@\324+8\206\272 -A#\21101\206 +@\206 r\333!q\210)\203\344 2\204\344 )\3348\262A\202\335\336!\203\2033\331U\204\337\340 !\34143\"_!\202\340 !)\\5\342\21167\n\203$\343 !6\344 !7\202=\n\2033 @6 A7\202=\345 !6\346 !758\206E\331\\7V9\331/6:\206V\331Z^]\3319\203u1\203i7\202k08\206q\331Z\202w5]. B\207" [window frame w32-frame pos-tip-use-relative-coordinates frame-coordinates pos-tip-w32-saved-max-width-height window-frame selected-window pos-tip-window-system w32 relative (0 . 0) pos-tip-frame-top-left-coordinates t (0 . 0) posn-at-point window-point posn-actual-col-row window-line-height redisplay 2 pos-visible-in-window-p (0 . 0) + window-inside-pixel-edges 0 window-pixel-edges window-buffer 9 boundp text-scale-mode round frame-char-height expt nil frame-pixel-width frame-pixel-height x-display-pixel-width x-display-pixel-height frame-coord pos posn line line-height geom x-y dx x y0 dy header-line-format text-scale-mode-amount text-scale-mode-step y xmax ymax pixel-height pos-tip-upperside-p pixel-width] 7 (#$ . 6036)])
|
#@28 Cancel timeout of tooltip.
|
(defalias 'pos-tip-cancel-timer #[nil "\301\302\"\207" [timer-list mapc #[(timer) "\301H\302=\205 \303!\207" [timer 5 x-hide-tip cancel-timer] 2]] 3 (#$ . 9356)])
|
#@131 Move out mouse pointer if it is inside region (LEFT RIGHT TOP BOTTOM)
|
in FRAME. Return new mouse position like (FRAME . (X . Y)).
|
(defalias 'pos-tip-avoid-mouse #[(left right top bottom &optional frame) "\204 \306 \307\310!!r\311\216\312 @\313\"\210\314 +\211\211A\242\n@\nA=\203\334 \f\247\203\334 \315!\316!\\\317V\203I \fZT\202K T\315!W\203^ \fZ\202` \317V\203q ZT\202s T\316!W\203\206 Z\202\210 ^^^\211\320V\203\332 U\203\255 \317Z\202\320 U\203\274 T\202\320 U\203\314 \317Z\202\320 T\321\f #\210\322\323!\210.\n\205\344 \f B,B\207" [frame save-selected-window--state mpos mframe mx my selected-frame internal--before-with-selected-window frame-selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord mouse-pixel-position frame-pixel-width frame-pixel-height 2 -2 set-mouse-pixel-position sit-for 0.0001 large-number left dl right dr top dt bottom db d] 5 (#$ . 9557)])
|
#@222 Compute the foreground color to use for tooltip.
|
|
TIP-COLOR is a face or a cons cell like (FOREGROUND-COLOR . BACKGROUND-COLOR).
|
If it is nil, use `pos-tip-foreground-color' or the foreground color of the
|
`tooltip' face.
|
(defalias 'pos-tip-compute-foreground-color #[(tip-color) "\302!\203 \303\304\"\206 \242\206 \206 \305\306!\207" [tip-color pos-tip-foreground-color facep face-attribute :foreground face-foreground tooltip] 3 (#$ . 10600)])
|
#@222 Compute the background color to use for tooltip.
|
|
TIP-COLOR is a face or a cons cell like (FOREGROUND-COLOR . BACKGROUND-COLOR).
|
If it is nil, use `pos-tip-background-color' or the background color of the
|
`tooltip' face.
|
(defalias 'pos-tip-compute-background-color #[(tip-color) "\302!\203 \303\304\"\206 \243\206 \206 \305\306!\207" [tip-color pos-tip-background-color facep face-attribute :background face-background tooltip] 3 (#$ . 11060)])
|
#@1218 Show STRING in a tooltip at POS in WINDOW.
|
Analogous to `pos-tip-show' except don't propertize STRING by `pos-tip' face.
|
|
PIXEL-WIDTH and PIXEL-HEIGHT specify the size of tooltip, if given. These
|
are used to adjust the tooltip position in order that it doesn't disappear by
|
sticking out of the display, and also used to prevent it from vanishing by
|
overlapping with mouse pointer.
|
|
Note that this function itself doesn't calculate tooltip size because the
|
character width and height specified by faces are unknown. So users should
|
calculate PIXEL-WIDTH and PIXEL-HEIGHT by using `pos-tip-tooltip-width' and
|
`pos-tip-tooltip-height', or use `pos-tip-show' instead, which can
|
automatically calculate tooltip size.
|
|
See `pos-tip-show' for details.
|
|
Example:
|
|
(defface my-tooltip
|
'((t
|
:background "gray85"
|
:foreground "black"
|
:inherit variable-pitch))
|
"Face for my tooltip.")
|
|
(defface my-tooltip-highlight
|
'((t
|
:background "blue"
|
:foreground "white"
|
:inherit my-tooltip))
|
"Face for my tooltip highlighted.")
|
|
(let ((str (propertize " foo \n bar \n baz " 'face 'my-tooltip)))
|
(put-text-property 6 11 'face 'my-tooltip-highlight str)
|
(pos-tip-show-no-propertize str 'my-tooltip))
|
(defalias 'pos-tip-show-no-propertize #[(string &optional tip-color pos window timeout pixel-width pixel-height frame-coordinates dx dy) "\204 \306 \307!\310 !\211\311=\n\312= \206) 4\313=\206) \f\205) 5?\31467849:& \203B \315\211;@<;A=\203W <\202] <>@Z?\203i =\202o =>AZ@?@BA\316B!C\317B!D\206\213 ?E\320 \321\"F\322GH\\\323\"I\203\245 \323\202\246 \3247\206\303 \203\266 \325 !\202\303 \f\203\300 5@\202\303 \326 !IZ\327 !\245\\8\206\323 \330 !IZ\331 !\245BJ\332!Kr\333\216\334K@\335\"\210\336 +\211L@M\337N\204 E\203VLA@\204VLA@\203M =\204\340\341 !A@!O\322O\211AO\242OA@\\\342\"P\322O\211AO\242OA@\\\342\"Q M\343MPQ#\210\344\345!\210+\202LA@\203M =\204\346 M\f4$R?R@\\?@RA\\@)7\203\2468\203\246\347?\350?7\f\203\231\351\202\232\324#@\2118\\M%L\352SM\353GB\354HB\355E?\205\303\356<B\357=BD\360\320 \360\"BCF\205\324\321FBCC;\205\337\361CBCD;\205\352\362DBC%BBT\205\373T\324V\205\373TE\205?LA@ZE\205@LAAZ&\210T\203%T\324X\203%\363 \210A.\207" [window frame winsys x-frame w32-frame pos-tip-use-relative-coordinates selected-window window-frame pos-tip-window-system x w32 relative pos-tip-compute-pixel-position t pos-tip-compute-foreground-color pos-tip-compute-background-color frame-parameter line-spacing ash 1 0 frame-pixel-width x-display-pixel-width frame-char-width x-display-pixel-height frame-char-height internal--before-with-selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord mouse-pixel-position nil window-inside-pixel-edges window-list -1 set-mouse-pixel-position sit-for 0.0001 pos-tip-frame-relative-position pos-tip-avoid-mouse + 3 x-show-tip border-width internal-border-width append left top font foreground-color background-color pos-tip-cancel-timer frame-coordinates pos-tip-w32-saved-max-width-height pos pixel-width pixel-height dx dy x-y ax ay pos-tip-saved-frame-coordinates rx ry retval tip-color fg bg use-dxdy spacing pos-tip-border-width pos-tip-internal-border-width border x-max-tooltip-size save-selected-window--state mpos mframe default-frame-alist edges mx my rel-coord string timeout] 13 (#$ . 11521)])
|
#@893 Split STRING into fixed width strings. Return a list of these strings.
|
|
WIDTH specifies the width of filling each paragraph. WIDTH nil means use
|
the width of currently selected frame. Note that this function doesn't add any
|
padding characters at the end of each row.
|
|
MARGIN, if non-nil, specifies left margin width which is the number of spece
|
characters to add at the beginning of each row.
|
|
The optional fourth argument JUSTIFY specifies which kind of justification
|
to do: `full', `left', `right', `center', or `none'. A value of t means handle
|
each paragraph as specified by its text properties. Omitting JUSTIFY means
|
don't perform justification, word wrap and kinsoku shori (禁則処理).
|
|
SQUEEZE nil means leave whitespaces other than line breaks untouched.
|
|
MAX-ROWS, if given, specifies maximum number of elements of return value.
|
The elements exceeding this number are discarded.
|
(defalias 'pos-tip-split-string #[(string &optional width margin justify squeeze max-rows) "\306\307!rq\210\310\216 \206 \n\206 \311 \206 \312\313\314\211\314c\210\315ed\"\210\203E \316ed?$\210\202K \317\320\"eb\210`\314\210`{\203e B\202\217 P\321\f\"\211BGGU\204\217 G\314O\211\204e )`dW\322\323!\210\204N \203\250 \324\"\202\252 \237.\n\207" [#1=#:temp-buffer pos-tip-tab-width tab-width width fill-column margin generate-new-buffer " *temp*" #[nil "\301!\205 |