;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\207" [require cl-lib custom-declare-group ov nil "Group for ov.el" :prefix "ov-" :group development] 8) (defvar ov-sticky-front nil) (defvar ov-sticky-rear nil) (defvar ov-prop-list '(priority window category face mouse-face display help-echo field modification-hooks insert-in-front-hooks insert-behind-hooks invisible intangible isearch-open-invisible isearch-open-invisible-temporary before-string after-string line-prefix wrap-prefix evaporate local-map keymap)) (byte-code "\300\301\302\"\210\300\303\302\"\207" [defalias ov-create make-overlay ov-make] 3) #@129 Make an overlay from BEG to END. If PROPERTIES are specified, set them for the created overlay. (fn BEG END &rest PROPERTIES) (defalias 'ov #[642 "\211\203\211\242<\203\211@\262\302\303? %\304\"\210\207\302\303? %\207" [ov-sticky-front ov-sticky-rear ov-make nil ov-set] 9 (#$ . 710)]) #@126 Make an overlay from the beginning of the line to the beginning of the next line, which include POINT. (fn &optional POINT) (defalias 'ov-line #[256 "\302\212\206`b\210\303\304 \305 Td^\302? %\262)\207" [ov-sticky-front ov-sticky-rear nil ov-make point-at-bol point-at-eol] 8 (#$ . 1018)]) #@154 Make overlays spanning the regions that match STRING. If BEG and END are numbers, they specify the bounds of the search. (fn STRING &optional BEG END) (defalias 'ov-match #[769 "\212\206eb\210\302\303d!\210\304\305#\203&\306\307\224\307\225\302? %B\262\202 \211\262)\207" [ov-sticky-front ov-sticky-rear nil ov-recenter search-forward t ov-make 0] 10 (#$ . 1321)]) #@154 Make overlays spanning the regions that match REGEXP. If BEG and END are numbers, they specify the bounds of the search. (fn REGEXP &optional BEG END) (defalias 'ov-regexp #[769 "\212\206eb\210\302\211\303d!\210\211\204@\304\305#\203@\306\307\224\307\225\302? %B\262\307\224\307\225U\203m\203:\305\262\202\310u\210\202\266\202)\207" [ov-sticky-front ov-sticky-rear nil ov-recenter re-search-forward t ov-make 0 1] 11 (#$ . 1706)]) #@52 Make an overlay from a region if region is active. (defalias 'ov-region #[0 "\302 \203\303\304 \305 \306? %\307\310!\210\207\311\312!\207" [ov-sticky-front ov-sticky-rear use-region-p ov-make region-beginning region-end nil deactivate-mark t error "Need to make region"] 6 (#$ . 2164)]) #@319 Set overlay properties and values. OV-OR-OVS-OR-REGEXP can be an overlay, overlays or a regexp. If an overlay or list of overlays, PROPERTIES are set for these. If a regexp, first overlays are created on the matching regions (see `ov-regexp'), then the properties are set. (fn OV-OR-OVS-OR-REGEXP &rest PROPERTIES) (defalias 'ov-set #[385 "\211C\205w\203\211\242\204\300\301!\210\211\242\242<\203 \211\242@\240\210\211\242G\302C\303;\2037\304!\262\305\262\202P\306!\203HC\262\307\262\202P<\203P\305\262\310\311\"\302=\204]\300\312!\210\313\314\315$\"\210\211\307=\203t@\207\266\203\207" [error "Arguments are OV and PROPERTIES" 0 nil ov-regexp ov-list ov-p ov logand 1 "Invalid properties pairs" mapc make-closure #[257 "\302\242\301W\203!\303\302\242\300\2428\302\211\242T\240\300\2428#\210\302\211\242T\240\210\202\302\304\240\207" [V0 V1 V2 overlay-put 0] 6 "\n\n(fn OV)"]] 12 (#$ . 2461)]) (defalias 'ov-put 'ov-set) #@81 Insert ANY (string, number, list, etc) covered with an empty overlay. (fn ANY) (defalias 'ov-insert #[257 "\211;\204 \302\303\"\262`G\\c\210\304\305? %\207" [ov-sticky-front ov-sticky-rear format "%s" ov-make nil] 10 (#$ . 3434)]) #@493 Clear overlays satisfying a condition. If PROP-OR-BEG is a symbol, clear overlays with this property set to non-nil. If VAL-OR-END is non-nil, the specified property's value should `equal' to this value. If both of these are numbers, clear the overlays between these points. If BEG and END are numbers, clear the overlays with specified property and value between these points. With no arguments, clear all overlays in the buffer. (fn &optional PROP-OR-BEG (VAL-OR-END \='any) BEG END) (defalias 'ov-clear #[384 "\211\203 \211A\262\242\202\300\211A\262\242\211A\262\242\203)\301\302\303\304G\\D\"\210\305\204I\300=\203I\204I\204I\306d!\210\307ed\"\266\202\352\247\203a\247\203a\306!\210\307\"\266\202\3529\203\201\300=\204\201\204\201\204\201\211\310ed%\266\202\3529\203\241\300=\203\241\204\241\204\241\211\311ed%\266\202\3529\203\305\300=\204\305\247\203\305\247\203\305\211\310%\266\202\3529\203\351\300=\203\351\247\203\351\247\203\351\211\311%\266\202\352\210\310\207" [any signal wrong-number-of-arguments ov-clear 4 #[1285 "\300\206d!\210\301\302\303$\304\"\"\207" [ov-recenter mapc make-closure #[257 "\300\303!>\205\302\204\301\304\300\"\232\205\305!\207" [V0 V1 V2 ov-prop ov-val delete-overlay] 5 "\n\n(fn OV)"] overlays-in] 11 "\n\n(fn PROP-OR-BEG VAL-OR-END CON BEG END)"] ov-recenter remove-overlays nil t] 12 (#$ . 3683) nil]) #@190 Clear overlays in OV-OR-OVS-VARIABLE. OV-OR-OVS-VARIABLE should be a symbol whose value is an overlay or a list of overlays. Finally, the variable is set to nil. (fn OV-OR-OVS-VARIABLE) (defalias 'ov-reset '(macro . #[257 "\300\301\302\303\304D\305\306BBFE\307\310BBE\207" [progn mapc (lambda (ov) (delete-overlay ov)) if listp cons (nil) setq (nil)] 10 (#$ . 5151)])) (byte-code "\300\301\302\"\210\300\303\302\"\210\300\304\305\"\210\300\306\307\"\210\300\310\311\"\210\300\312\313\"\210\300\314\315\"\207" [defalias ov-p overlayp ov\? ov-val overlay-get ov-beg overlay-start ov-end overlay-end ov-buf overlay-buffer ov-prop overlay-properties] 3) #@67 Return the length of the region spanned by OVERLAY. (fn OVERLAY) (defalias 'ov-length #[257 "\300!\301!Z\207" [ov-end ov-beg] 4 (#$ . 5815)]) #@173 Make an overlay specification list. This is of the form: (beginning end buffer &rest properties). OV-OR-OVS should be an overlay or a list of overlays. (fn OV-OR-OVS) (defalias 'ov-spec #[257 "\211<\204 \211C\262\300\301\"\207" [mapcar #[257 "\300!\301!\302!\303!F\207" [ov-beg ov-end ov-buf overlay-properties] 6 "\n\n(fn OV)"]] 4 (#$ . 5967)]) #@87 Get an overlay at POINT. POINT defaults to the current `point'. (fn &optional POINT) (defalias 'ov-at #[256 "\211\204`\262\300!@\207" [overlays-at] 3 (#$ . 6331)]) #@483 Get overlays satisfying a condition. If PROP-OR-BEG is a symbol, get overlays with this property set to non-nil. If VAL-OR-END is non-nil, the specified property's value should `equal' to this value. If both of these are numbers, get the overlays between these points. If BEG and END are numbers, get the overlays with specified property and value between these points. With no arguments, get all overlays in the buffer. (fn &optional PROP-OR-BEG (VAL-OR-END \='any) BEG END) (defalias 'ov-in #[384 "\211\203 \211A\262\242\202\300\211A\262\242\211A\262\242\203)\301\302\303\304G\\D\"\210\305\204A\300=\203A\204A\204A\306ed\"\207\247\203Q\247\203Q\306\"\2079\203m\300=\204m\204m\204m\211\307ed%\2079\203\211\300=\203\211\204\211\204\211\211\310ed%\2079\203\251\300=\204\251\247\203\251\247\203\251\211\307%\2079\203\311\300=\203\311\247\203\311\247\203\311\211\310%\207\307\207" [any signal wrong-number-of-arguments ov-in 4 #[1285 "\300\301\302\303\304   $\305\"\"\"\207" [delq nil mapcar make-closure #[257 "\300\303!>\205\302\204\301\304\300\"\232\205\211\207" [V0 V1 V2 ov-prop ov-val] 5 "\n\n(fn $OV)"] overlays-in] 13 "\n\n(fn PROP-OR-BEG VAL-OR-END CON BEG END)"] overlays-in nil t] 12 (#$ . 6507)]) #@44 Get all the overlays in the entire buffer. (defalias 'ov-all #[0 "\300ed\"\207" [overlays-in] 3 (#$ . 7820)]) #@87 Get all the overlays from the beginning of the buffer to POINT. (fn &optional POINT) (defalias 'ov-backwards #[256 "\300e\206`\"\207" [ov-in] 4 (#$ . 7936)]) #@81 Get all the overlays from POINT to the end of the buffer. (fn &optional POINT) (defalias 'ov-forwards #[256 "\300\206`d\"\207" [ov-in] 4 (#$ . 8104)]) (byte-code "\300\301\302\"\210\300\303\304\"\207" [defalias ov-recenter overlay-recenter ov-move move-overlay] 3) #@94 Execute FUNC-AFTER after TIME seconds passed since FUNC finished. (fn TIME FUNC FUNC-AFTER) (defalias 'ov-timeout '(macro . #[771 "\2119\203\300\301\302\301\303\304DDE#\210\202$\300\301\302\301\302\301E E#\2109\203, \207\305!\207" [run-with-timer nil lambda funcall quote eval] 11 (#$ . 8379)])) (byte-code "\300\301\302\303#\300\207" [function-put ov-timeout lisp-indent-function 1] 4) #@511 Get the next overlay satisfying a condition. If POINT-OR-PROP is a symbol, get the next overlay with this property being non-nil. If PROP-OR-VAL is non-nil, the property should have this value. If POINT-OR-PROP is a number, get the next overlay after this point. If PROP-OR-VAL and VAL are also specified, get the next overlay after POINT-OR-PROP having property PROP-OR-VAL set to VAL (with VAL unspecified, only the presence of property is tested). (fn &optional POINT-OR-PROP PROP-OR-VAL (VAL \='any)) (defalias 'ov-next #[640 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\305\247\204&\204G\204G\300=\203G\306\2066`!\307!\310!\203A\207\307\306!!\207\203a9\203a\204a\300=\203a\211`\300#\207\203|9\203|\203|\300=\203|\211`#\207\203\205\247\203\2329\203\232\300=\204\232\211\206\226`#\207\247\204\243\204\2629\203\262\211\206\256`#\207\311\207" [any signal wrong-number-of-arguments ov-next 3 #[771 "\212\300!b\210\301\302`!\211\262\203'\303!>\203'\304=\2049\305\"\232\2049m\2031\301\262\2029\300`!b\210\202\211\262)\207" [next-overlay-change nil ov-at ov-prop any ov-val] 8 "\n\n(fn PO PR VA)"] next-overlay-change ov-at ov\? nil] 10 (#$ . 8787)]) #@527 Get the previous overlay satisfying a condition. If POINT-OR-PROP is a symbol, get the previous overlay with this property being non-nil. If PROP-OR-VAL is non-nil, the property should have this value. If POINT-OR-PROP is a number, get the previous overlay after this point. If PROP-OR-VAL and VAL are also specified, get the previous overlay after POINT-OR-PROP having property PROP-OR-VAL set to VAL (with VAL unspecified, only the presence of property is tested). (fn &optional POINT-OR-PROP PROP-OR-VAL (VAL \='any)) (defalias 'ov-prev #[640 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\305\247\204&\204H\204H\300=\203H\306`!\306!\307!\206@\307S!\310!\205G\211\207\203b9\203b\204b\300=\203b\211`\300#\207\203}9\203}\203}\300=\203}\211`#\207\203\206\247\203\2339\203\233\300=\204\233\211\206\227`#\207\247\204\244\204\2639\203\263\211\206\257`#\207\311\207" [any signal wrong-number-of-arguments ov-prev 3 #[771 "\212\300!b\210\301\302`S!\211\262\203(\303!>\203(\304=\204:\305\"\232\204:o\2032\301\262\202:\300`!b\210\202\211\262)\207" [previous-overlay-change nil ov-at ov-prop any ov-val] 8 "\n\n(fn PO PR VA)"] previous-overlay-change ov-at ov\? nil] 10 (#$ . 10049)]) #@145 Move cursor to the end of the next overlay. The arguments are the same as for `ov-next'. (fn &optional POINT-OR-PROP PROP-OR-VAL (VAL \='any)) (defalias 'ov-goto-next #[640 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\305#\211\205)\306!b\207" [any signal wrong-number-of-arguments ov-goto-next 3 ov-next ov-end] 9 (#$ . 11338) nil]) #@151 Move cursor to the beginning of previous overlay. The arguments are the same as for `ov-prev'. (fn &optional POINT-OR-PROP PROP-OR-VAL (VAL \='any)) (defalias 'ov-goto-prev #[640 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\305#\211\205)\306!b\207" [any signal wrong-number-of-arguments ov-goto-prev 3 ov-prev ov-beg] 9 (#$ . 11710) nil]) #@312 Set KEYBINDS to an overlay or a list of overlays. If OV-OR-OVS-OR-ID is a symbol, the KEYBINDS will be enabled for the entire buffer and the property represented by the symbol to t. The overlay is expanded if new inputs are inserted at the beginning or end of the buffer. (fn OV-OR-OVS-OR-ID &rest KEYBINDS) (defalias 'ov-keymap #[385 "\302 \303G!\203o\203o\211A\262\242\211A\262\242\304!\203#\211\2023\211:\2030\305\306\307F\2023\310\311!\312!\203C\313#\266\202 ;\203T\313\314!#\266\202 <\203g\315\316\317#\"\266\202 \310\320!\266\202 9\203\204\321\211\322ed\323\321&*\207\324\323#\207" [ov-sticky-rear ov-sticky-front make-sparse-keymap cl-evenp commandp lambda nil (interactive) error "Invalid function" vectorp define-key kbd mapc make-closure #[257 "\302\300\303!\203\f\202;\205\304!\301#\207" [V0 V1 define-key vectorp kbd] 5 "\n\n(fn K)"] "Invalid key" t ov keymap ov-set] 11 (#$ . 12088)]) #@414 Implement a read-only like feature for an overlay or a list of overlays. If INSERT-IN-FRONT is non-nil, inserting in front of each overlay is prevented. If INSERT-BEHIND is non-nil, inserting behind of each overlay is prevented. Note that it allows modifications from out of range of a read-only overlay. OV-OR-OVS can be an overlay or list of overlay. (fn OV-OR-OVS &optional INSERT-IN-FRONT INSERT-BEHIND) (defalias 'ov-read-only #[769 "\203\211\204\300\301\302#\207\203!\211\203!\300\301\303\304\305\306\307&\207\203-\300\301\310\304\311%\207\300\301\312\306\313%\207" [ov-set modification-hooks (ov--read-only) (ov--read-only) insert-in-front-hooks (ov--read-only) insert-behind-hooks (ov--read-only) (ov--read-only) (ov--read-only) (ov--read-only) (ov--read-only)] 11 (#$ . 13053)]) #@42 (fn OV AFTER BEG END &optional LENGTH) (defalias 'ov--read-only #[1284 "\206\206 \302=\206 \303=?\205(\304!W\204%\305!V\205(\306\307!\207" [undo-in-progress this-command undo redo ov-beg ov-end error "Text is read-only"] 7 (#$ . 13867)]) #@197 Set a placeholder feature for an overlay or a list of overlays. Each overlay deletes its string and overlay, when it is modified. OV-OR-OVS can be an overlay or list of overlay. (fn OV-OR-OVS) (defalias 'ov-placeholder #[257 "\300\301\302\303\304\305\306\307\310& \207" [ov-set evaporate t modification-hooks (ov--placeholder) insert-in-front-hooks (ov--placeholder) insert-behind-hooks (ov--placeholder)] 11 (#$ . 14129)]) #@42 (fn OV AFTER BEG END &optional LENGTH) (defalias 'ov--placeholder #[1284 "\303 \206\n\304=\206\n\305=?\205@\204(=\203(\306!\307!|\202@\205@\211\310V\205@\306!\205@\306!\307!|)\207" [inhibit-modification-hooks undo-in-progress this-command t undo redo ov-beg ov-end 0] 8 (#$ . 14563)]) #@104 Convert a HEX color code to a RGB list. i.e. #99ccff => (153 204 255) #33a => (51 51 170) (fn HEX) (defalias 'ov--parse-hex-color #[257 "\300\301\302\"\203,\303\304\"\303\305\"\303\306\"\307\310\311\211#!\307\310\311\211#!\307\310\311\211#!E\266\204\301\312\"\203T\307\310\313\303\304\"\"!\307\310\313\303\305\"\"!\307\310\313\303\306\"\"!E\262\207" [nil string-match "^\\s-*\\#\\([0-9a-fA-F]\\)\\([0-9a-fA-F]\\)\\([0-9a-fA-F]\\)\\s-*$" match-string 1 2 3 read format "#x%s%s" "^\\s-*\\#\\([0-9a-fA-F]\\{2\\}\\)\\([0-9a-fA-F]\\{2\\}\\)\\([0-9a-fA-F]\\{2\\}\\)\\s-*$" "#x%s"] 12 (#$ . 14880)]) #@144 Generate random color based on BASE-COLOR and RANGE. Default background color is used when BASE-COLOR is nil. (fn &optional BASE-COLOR RANGE) (defalias 'ov--random-color #[512 "\211C\211\242\204 \211\300\240\210\3011\302\303\304\"0\202\210\305\204?\211\306=\203'\307\202=\310\311\"\2032\211\202=\312!\203<\211\202=\307\262\210\312!\203j\305C\313C\314\315\316\"\312!\"\210\211\242\237\240\210\314\315\317\"\242\"\210\211\242\262\266\320!\242\321\245\322\211\323$\324$\321$\325\326$\207" [50 (error) face-attribute default :background nil unspecified "#fff" string-match "^#[0-9a-fA-F]\\{3,6\\}" color-name-to-rgb "#" mapc make-closure #[257 "\300\301\302_!\300\242B\240\207" [V0 round 255] 5 "\n\n(fn X)"] #[257 "\300\211\242\301\302\"P\240\207" [V0 format "%02x"] 6 "\n\n(fn X)"] ov--parse-hex-color 2 #[1028 "\2118\300Z\301W\203\262V\203\262\302\242!Z\\\262\211\303W\203/\303\262\211\300V\2038\300\262\207" [255 nil cl-random 0] 10 "\n\n(fn RANGE RGB HALF-RANGE N)"] 0 1 format "#%02x%02x%02x"] 14 (#$ . 15501)]) #@404 Set background color overlays to the current buffer. Each background color is randomly determined based on BASE-COLOR or the default background color. If REGEXP-OR-LIST is regexp Set overlays between matches of a regexp. If REGEXP-OR-LIST is list Set overlays between point pairs in a list. i.e. (ov-smear '((1 . 30) (30 . 90))) (fn REGEXP-OR-LIST &optional MATCH-END BASE-COLOR COLOR-RANGE) (defalias 'ov-smear #[1025 "\300\301!\210\302\211\211\303\302C;\203T\212eb\210\304 \302\305#\2030\203'\303\225\202)\303\224B\262\202)\237\262G\262SW\203^8T8BB\262T\262\2029<\203^\262\306\307\310  $\"\210\211\242\207" [ov-clear ov-smear nil 0 re-search-forward t mapc make-closure #[257 "\303@A\"\304\305\306\307\300\301\"D\310\311%\210\302\302\242B\240\207" [V0 V1 V2 ov ov-set face :background ov--random-color ov-smear t] 9 "\n\n(fn A)"]] 15 (#$ . 16595) "sSplitter: "]) (provide 'ov)