;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302\303\304#\210\305\306\303\307\310\311\312\313&\210\314\315\316\317\320DD\321\322\323%\210\314\324\316\317\325DD\326\322\327%\210\314\330\316\317\331DD\332\322\333%\210\334\335\336\337#\210\334\340\341\342#\210\314\343\316\317\344DD\345\322\346%\210\334\347\350\351#\210\334\352\353\354#\210\314\355\316\317\356DD\357\322\360%\210\314\361\316\317\362DD\363\322\323%\210\314\364\316\317\365DD\366\322\323%\207" [require timer hexrgb nil t custom-declare-group on-screen "Guide your eyes while scrolling." :group convenience :prefix "on-screen" custom-declare-variable on-screen-inverse-flag funcall function #[0 "\300\207" [nil] 1] "What area to highlight.\nWhen nil, highlight the previously visible screenful. Else\nhighlight the previously off-screen parts." :type boolean on-screen-highlight-method #[0 "\300\207" [fringe] 1] "Type of highlighting used by `on-screen-mode'.\nThe following values are valid:\n\n fringe - graphical markers in the fringe\n shadow - transparent overlay on the text\n line - transparent overlay on the confining text lines\n narrow-line - narrow horizontal lines\n\nThe fringe and the narrow-line methods only work on graphical\ndisplays. narrow-line only works with Emacs 24 or higher.\n\n`on-screen-inverse-flag' defines which part(s) of the buffers are\nhighlighted.\n\nThe face used for \"shadow\" and \"line\" may be computed\ndynamically to support different background colors (color themes)\n- see `on-screen-highlighting-to-background-delta'." (choice (const :tag "Fringe markers" fringe) (const :tag "Transparent overlay" shadow) (const :tag "Overlay on confining text lines" line) (const :tag "Narrow horizontal line" narrow-line)) on-screen-fringe-marker-position #[0 "\300\207" [t] 1] "Where to display fringe markers.\nIgnored if highlighting doesn't use the fringe." (choice (const :tag "Left fringe only" left) (const :tag "Right fringe only" right) (const :tag "Both sides" t)) custom-declare-face on-screen-shadow ((((class color) (min-colors 88) (background light)) :background "#f2efcb") (((class color) (min-colors 88) (background dark)) :background "#272620") (((class color) (min-colors 8) (background light)) :background "green") (((class color) (min-colors 8) (background dark)) :background "blue")) "Face used for displaying a transparent overlay." on-screen-hl-line ((((background light)) :background "#ffa0a0") (((background dark)) :background "#300000")) "Face used for displaying the \"line\" style overlay." on-screen-highlighting-to-background-delta #[0 "\300\207" [0.05] 1] "How much shadow and line highlighting should differ from background.\nThis should be a positive floating point number less than 1.\nSmaller values will lead to a highlighting color being more\nsimilar to the frame background. A value of nil means to use use\njust face `on-screen-shadow'.\n\nThis variable is ignored if the library \"hexrgb\" is not\navailable." (choice (const :tag "Use standard face" nil) (float :tag "Delta")) on-screen-fringe ((t (:inherit shadow))) "Face used for fringe markers." on-screen-narrow-line ((((background dark)) (:width extra-expanded :underline (:color "gray30" :style wave))) (((background light)) (:width extra-expanded :underline (:color "gray70" :style wave)))) "Face used by the narrow-line highlighting method." on-screen-delay #[0 "\300\207" [5] 1] "How long `on-screen-mode' should display optical aids." number on-screen-auto-update #[0 "\300\207" [t] 1] "Whether to update highlighting for successive scrolls.\nWhen non-nil, every scroll action will cause a highlighting\naccording to the previously visible screenful. When nil, a once\ndrawn highlighting will remain fixed relative to the text even\nif you scroll further until `on-screen-delay' is over." on-screen-remove-when-edit #[0 "\300\207" [nil] 1] "Whether to instantly remove highlighting when editing.\n\nIn those situations where a single command causes multiple\nchanges to a buffer highlighting is always removed to avoid\nconfusion."] 8) (defvar on-screen-treat-cut-lines--default-fraction 0.3) (byte-code "\301\302\303\304\305DD\306\307\310\311\312\313\314\315\316\257F%\210\301\317\303\304\320DD\321\307\322%\207" [on-screen-treat-cut-lines--default-fraction custom-declare-variable on-screen-treat-cut-lines funcall function #[0 "\300\207" [nil] 1] "Whether to care about vertically cut lines.\nIf nil, always count lines at the window start or end that are\nonly partially visible as part of the visible area. Else, a\nnumber between 0 and 1, meaning that lines will count as visible\nwhen the hidden part of them is less than this number. Note that\na non-nil value may make scrolling stuttering on slow computers." :type choice (const :tag "Count partially visible lines as visible" nil) (const :tag "Count partially visible lines as not visible" t) float :tag "Count lines with hidden part less than this as visible" :value on-screen-drawing-threshold #[0 "\300\207" [2] 1] "If set, highlight only when scrolled at least that many lines." (choice (const :tag "Off" nil) (integer :value 2))] 13) #@261 Disable highlighting if non-nil. This variable is checked before highlighting is actually being performed, with the according buffer being current. If a function, it will be called with zero arguments. Highlighting will be inhibited if the result is non-nil. (defvar on-screen-inhibit-highlighting nil (#$ . 5207)) #@38 Priority for all on-screen overlays. (defvar on-screen-overlay-priority 30 (#$ . 5529)) #@51 Whether we have already added stuff to the hooks. (defvar on-screen-initialized-p nil (#$ . 5623)) #@41 Association list holding internal data. (defvar on-screen-data nil (#$ . 5728)) (defvar on-screen-command-counter 0) (defvar on-screen-last-change 0) #@97 Non-nil if On-Screen mode is enabled. Use the command `on-screen-mode' to change this variable. (defvar on-screen-mode nil (#$ . 5884)) (make-variable-buffer-local 'on-screen-mode) #@292 Buffer local minor mode guiding your eyes while scrolling. With a prefix argument ARG, enable the mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. Type M-x customize-group on-screen RET for configuration. (fn &optional ARG) (defalias 'on-screen-mode #[256 "\303 \304=\203 ?\202\247\203\305W\203\306\202\307\310\301!\2031\311\300 \"\2031\300 B\203<\n\204<\312 \210\313\314\203F\315\202G\316\"\210\317\320!\203i\303 \203[\211\303 \232\203i\321\322\203e\323\202f\324\325#\210\210\326 \210\207" [on-screen-mode local-minor-modes on-screen-initialized-p current-message toggle 1 nil t boundp delq on-screen-initialize run-hooks on-screen-mode-hook on-screen-mode-on-hook on-screen-mode-off-hook called-interactively-p any message "On-Screen mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 6072) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar on-screen-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\210\314\315\316\317\320DD\321\322\323\324\325\326\327\330\331& \207" [on-screen-mode-map on-screen-mode-hook variable-documentation put "Hook run after entering or leaving `on-screen-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode on-screen-mode boundp custom-declare-variable on-screen-global-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if On-Screen-Global mode is enabled.\nSee the `on-screen-global-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 `on-screen-global-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean :group on-screen] 12) #@388 Global minor mode guiding your eyes while scrolling. With a prefix argument ARG, enable the mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. You can make use of `on-screen-inhibit-highlighting' to prevent highlighting on a per-buffer basis. Type M-x customize-group on-screen RET for configuration. (fn &optional ARG) (defalias 'on-screen-global-mode #[256 "\303 \304\301\305=\203\306\301!?\202!\247\203 \307W\203 \310\202!\311\"\210\312\300!\2038\313\301\"\306\301!\2038\301B \203C\n\204C\314 \210\315\316\306\301!\203O\317\202P\320\"\210\321\322!\203x\323\301!\210\303 \203h\211\303 \232\203x\324\325\306\301!\203t\326\202u\327\330#\210\210\331 \210\306\301!\207" [global-minor-modes on-screen-global-mode on-screen-initialized-p current-message set-default toggle default-value 1 nil t boundp delq on-screen-initialize run-hooks on-screen-global-mode-hook on-screen-global-mode-on-hook on-screen-global-mode-off-hook called-interactively-p any customize-mark-as-set message "On-Screen-Global mode %sabled%s" "en" "dis" "" force-mode-line-update] 6 (#$ . 8129) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar on-screen-global-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\210\314\315\312\"\207" [on-screen-global-mode-map on-screen-global-mode-hook variable-documentation put "Hook run after entering or leaving `on-screen-global-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode on-screen-global-mode boundp defalias global-on-screen-mode] 6) (defalias 'on-screen--treat-cut-lines-get-fraction #[0 "\302!\203\207 \207" [on-screen-treat-cut-lines on-screen-treat-cut-lines--default-fraction floatp] 2]) #@82 Like `window-start', but exclude partially visible lines. (fn &optional WINDOW) (defalias 'on-screen-window-start #[256 "\301!\205\f\302\303#\211AA\204\207\211\304G\305U\203&\211A\262\210\202.\306\307\310GD\"\210\304\211A\262\210\211A\262\242\304\211A\262\210\211A\262\242\304\311!\\\245\312 W\203Y\207r\313\n!q\210\212b\210\314\315!\210`*\207" [on-screen-treat-cut-lines window-start pos-visible-in-window-p t nil 6 signal wrong-number-of-arguments (_x _y rtop _rbot rowh _vpos) float on-screen--treat-cut-lines-get-fraction window-buffer on-screen-beginning-of-line 2] 13 (#$ . 10129)]) #@80 Like `window-end', but exclude partially visible lines. (fn &optional WINDOW) (defalias 'on-screen-window-end #[256 "\301!\205 \302S\303#\211AA\204\207\211\304G\305U\203'\211A\262\210\202/\306\307\310GD\"\210\304\211A\262\210\304\211A\262\210\211A\262\242\211A\262\242\304\311!\\\245\312 W\203Z\207r\313\n!q\210\212b\210\314\315!\210`*\207" [on-screen-treat-cut-lines window-end pos-visible-in-window-p t nil 6 signal wrong-number-of-arguments (_x _y _rtop rbot rowh _vpos) float on-screen--treat-cut-lines-get-fraction window-buffer on-screen-beginning-of-line 0] 13 (#$ . 10756)]) #@20 (fn &optional N) (defalias 'on-screen-beginning-of-line #[256 "\211\206\300\262\301S!\207" [1 forward-visible-line] 3 (#$ . 11377)]) #@20 (fn &optional N) (defalias 'on-screen-end-of-line #[256 "\211\206\300\262\301S!\210\302 \207" [1 forward-visible-line end-of-visible-line] 3 (#$ . 11522)]) #@390 Store information for window WIN in `on-screen-data'. AREA is a list (beg end). TIMER is the currently active timer object. OVERLAYS are the on-screen overlays currently visible in WIN. A nil value for AREA, TIMER or OVERLAYS means that the remembered values should not be changed. If TIMER is the symbol `finished', remember nil for the timer. (fn WIN AREA &optional TIMER OVERLAYS) (defalias 'on-screen-record-data #[1026 "\301\"\211A\211@\302!=\206\211\205A@\262\303!\203$\2024\203,\304\2024\211\2054AA@\262\206C\211\205CAAA@\262\302!F\262\203Z\241\207BB\211\207" [on-screen-data assoc window-buffer timerp nil] 11 (#$ . 11691)]) #@66 Return stored data for WIN if existent and up-to-date. (fn WIN) (defalias 'on-screen-get-data #[257 "\301\"A\211@\302!=\205\211A\207" [on-screen-data assoc window-buffer] 5 (#$ . 12379)]) #@48 Delete information stored for deleted windows. (defalias 'on-screen-cleanup-data #[0 "\301\302\303\304\"\"\211\207" [on-screen-data delq nil mapcar #[257 "\300@!\205\211\207" [window-live-p] 3 "\n\n(fn ENTRY)"]] 5 (#$ . 12579)]) #@137 Helper calculating a suitable background color for highlighting. (fn WIN DELTA-BRIGHTNESS-DARK-BG DELTA-BRIGHTNESS-LIGHT-BG DELTA-HUE) (defalias 'on-screen-derive-from-frame-bg #[1028 "\300!\301!\205j\302\303!\205j\304\305!\236A\211\306\235\203+\307\310\"\311=\203(\312\202)\313\262\211\2056\314!\2056\211\262\3151C\316!0\202E\210\317\211\205h\320\321\"\203d\322\307\310\"\311=\203`\202b\"\207\323\"\266\202\207" [window-frame display-graphic-p featurep hexrgb background-color frame-parameters (nil unspecified "unspecified-bg") frame-parameter background-mode dark "Black" "White" x-color-defined-p (error) hexrgb-saturation nil hexrgb-approx-equal 0.0 hexrgb-increment-value hexrgb-increment-hue] 12 (#$ . 12820)]) #@59 Return face for the transparent overlay in WIN. (fn WIN) (defalias 'on-screen-get-shadow-face #[257 "\302=\203& \203$\303\304\305\306\307\310\307E\"#\211\205\311\312DDC\262\206'\313\207\314\207" [on-screen-highlight-method on-screen-highlighting-to-background-delta shadow apply on-screen-derive-from-frame-bg mapcar #[257 "\211_\207" [on-screen-highlighting-to-background-delta] 3 "\n\n(fn X)"] 1 -1 t :background on-screen-shadow on-screen-hl-line] 9 (#$ . 13575)]) #@78 Create and return list of fringe overlays. (fn POS TOPP &optional INVERSEP) (defalias 'on-screen-make-fringe-overlays #[770 "\301\211\302=\2044\212\303b\210\304\204\305\202\203\306\202\307!\210``T\")\262\310\311\312\301##\210\313=\204f\212\303b\210\304\204H\305\202Q\203P\306\202Q\307!\210``T\")\262\310\311\312\314##\210\315\301D\"\207" [on-screen-fringe-marker-position nil left make-overlay on-screen-beginning-of-line 1 2 0 overlay-put before-string on-screen-fringe-string right t delq] 12 (#$ . 14060)]) #@93 Return a string suitable for displaying fringe markers. (fn TOPP LEFTP &optional INVERSEP) (defalias 'on-screen-fringe-string #[770 "\300\301\302\303!\304\203\305\202\306?\"\203&\203\"\307\2020\310\2020\203/\311\2020\312\313E#\207" [#[514 "\203\211?\207\207" [] 3 "\n\n(fn X Y)"] propertize purecopy " " display left-fringe right-fringe top-left-angle top-right-angle bottom-left-angle bottom-right-angle on-screen-fringe] 11 (#$ . 14613)]) #@61 Create an overlay around POS for the line method. (fn POS) (defalias 'on-screen-make-line-overlay #[257 "\212\300b\210\301 \210`b\210\302 \210`T\")\207" [make-overlay on-screen-beginning-of-line on-screen-end-of-line] 4 (#$ . 15084)]) #@72 Create an overlay around POS for the narrow-line method. (fn WIN POS) (defalias 'on-screen-make-narrow-line-overlay #[514 "\212\300b\210\301 \210`b\210\302 \210`\")\303\304\305#\210\303\306\307\310\304\305\311\312\313\314 !E\315\316&#\210\207" [make-overlay on-screen-beginning-of-line on-screen-end-of-line overlay-put face on-screen-narrow-line after-string propertize "foo" display space :align-to window-width cursor 0] 15 (#$ . 15328)]) #@163 Return a list of all windows. With ALL-FRAMES non-nil, include all windows of all frames, else only the windows of the selected frame. (fn &optional ALL-FRAMES) (defalias 'on-screen-get-windows #[256 "\300\301\302\303\203 \304 \202\305 C\"\"\207" [apply nconc mapcar #[257 "\300!\207" [window-list] 3 "\n\n(fn FRAME)"] frame-list selected-frame] 6 (#$ . 15784)]) #@54 Remember visible buffer parts in the selected frame. (defalias 'on-screen-pre-command #[0 "T\301\302\303\"\210\3041\305\306\307 \"0\207\210\310\207" [on-screen-command-counter add-hook after-change-functions on-screen-after-change (debug error) mapc #[257 "r\300!q\210\301 \205\302\303!\304!D\")\207" [window-buffer on-screen-enabled-p on-screen-record-data on-screen-window-start on-screen-window-end] 6 "\n\n(fn WIN)"] on-screen-get-windows nil] 3 (#$ . 16159)]) #@101 DTRT after scrolling. This should normally go to `window-scroll-functions'. (fn WIN DISPLAY-START) (defalias 'on-screen-after-scroll #[514 "\3061\310r\307!q\210\310 \205\305\311!\211@A@AA@@A@\203H\312!\203H\242\313 !=\204H\314!\210\315!\210\316\317#\210\320\262\312!\203[\321\322\323 \"\"\266\206\202\305?\206\303U\206\303\324ed#?\206\303\n\247\203\207\325\326\327\330\nD\331\"\"!\nW\206\303 \fB\203\250\203\250\332e\n\"\203\250\332d\n\"\203\250\320\262\320\262\203\312\203\312dY\203\312\313\n!W\203\312\332d\n\"\203\312\320\262\211\333\232\203\340\205k\205k\334\"C\202k\211@\335=\203\373\205\357\334e\"\205\367\334d\"D\202k\211@\336=\203\337\205 \340\320A#\205\340S\341A#\"\202k\211\342\232\2035\205)\343!\2051\343S!D\202k\211@\344=\203O\205D\343S!\205K\343!D\202k\211@\345=\205k\205`\346 S\"\205j\346\nS\"D\262\262\347\320\"\262\211\203\220\211@\350\351\f#\210\350\352 #\210A\266\202\202v\210 \353>\203\257\211\203\256\211@\350\354\355 !#\210A\266\202\202\230\210\316\320\356\357\323 \360 !\"\320\361$$\266\206)0\207\210\320\207" [on-screen-auto-update on-screen-delay on-screen-drawing-threshold on-screen-highlight-method on-screen-inverse-flag on-screen-overlay-priority (debug error) window-buffer on-screen-enabled-p on-screen-get-data timerp on-screen-window-start on-screen-remove-highlighting cancel-timer on-screen-record-data finished nil timer-set-time timer-relative-time current-time <= abs apply count-lines sort < pos-visible-in-window-p (shadow) make-overlay shadow fringe append on-screen-make-fringe-overlays t (line) on-screen-make-line-overlay line narrow-line on-screen-make-narrow-line-overlay delq overlay-put window priority (shadow line) face on-screen-get-shadow-face run-at-time time-add seconds-to-time #[257 "\3001%\301!\203!r\302!q\210\303!\210\304\305!\306!D\307#\210)\310 0\207\210\311\207" [(debug error) window-live-p window-buffer on-screen-remove-highlighting on-screen-record-data on-screen-window-start on-screen-window-end finished on-screen-cleanup-data nil] 6 "\n\n(fn WIN)"]] 16 (#$ . 16641)]) #@134 Delete all on-screen overlays in window WIN. This has to be done for a previously buffer if the window-buffer had changed. (fn WIN) (defalias 'on-screen-remove-highlighting #[257 "\301\"\211A\211@\302!\205Ar\211q\210A\211A@AA@\211\211\203-\211@\303!\210A\266\202\202\210\304!\2038\305!\210\266)\306\"\211\207" [on-screen-data assoc buffer-live-p delete-overlay timerp cancel-timer delq] 11 (#$ . 18835)]) #@150 Reset highligting for current buffer after it was changed. This has to be done for all its windows. Goes to `after-change-functions'. (fn &rest _) (defalias 'on-screen-after-change #[128 "\204\n \nU\203/p\303!\203.\304\305!\211\203-\211@\306!=\203&\307!\210A\266\202\202\210\210\n\211\207" [on-screen-remove-when-edit on-screen-last-change on-screen-command-counter on-screen-enabled-p on-screen-get-windows t window-buffer on-screen-remove-highlighting] 6 (#$ . 19266)]) #@155 Clean up after the window configuration has changed. I.e., for all windows of the selected frame, remove all highlightings and clear all associated data. (defalias 'on-screen-after-wconf-change #[0 "\300 \211\211\205\211@\301!\210A\266\202\202\207" [on-screen-get-windows on-screen-remove-highlighting] 5 (#$ . 19761)]) #@74 Return non-nil if on-screen is enabled in BUFFER. (fn &optional BUFFER) (defalias 'on-screen-enabled-p #[256 "r\211\206pq\210\204 \205%\n\204\303\202%\304\n!\203$\n ?\202%\305)\207" [on-screen-global-mode on-screen-mode on-screen-inhibit-highlighting t functionp nil] 3 (#$ . 20093)]) #@30 Prepare for using on-screen. (defalias 'on-screen-initialize #[0 "\301\302\303\"\210\301\304\305\"\210\301\306\307\"\210\301\310\311\"\210\312\211\207" [on-screen-initialized-p add-hook pre-command-hook on-screen-pre-command window-scroll-functions on-screen-after-scroll after-change-functions on-screen-after-change window-configuration-change-hook on-screen-after-wconf-change t] 3 (#$ . 20396)]) #@43 Function to run when unloading on-screen. (defalias 'on-screen-unload-function #[0 "\300\301\302\"\210\300\303\304\"\210\300\305\306\"\210\300\307\310\"\210\311\207" [remove-hook pre-command-hook on-screen-pre-command window-scroll-functions on-screen-after-scroll after-change-functions on-screen-after-change window-configuration-change-hook on-screen-after-wconf-change nil] 3 (#$ . 20803)]) (provide 'on-screen)