;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302\303\"\207" [require cl-lib sly-messages "lib/sly-messages"] 3) (defvar sly-part-button-keymap (byte-code "\301 \302\"\210\303\304\305#\210\303\306\305#\210\303\307\310#\210\303\311\310#\210\207" [button-map make-sparse-keymap set-keymap-parent define-key [down-mouse-3] sly-button-popup-part-menu [mouse-3] [mouse-1] push-button [return]] 5)) (defvar sly-button-popup-part-menu-keymap (make-sparse-keymap)) #@50 Popup a menu for a `sly-part' button (fn EVENT) (defalias 'sly-button-popup-part-menu #[257 "\300\301\302!!!\303\304\"\303\305\"A\306\307\310\205\311\312\313\211\314%C\"B!\207" [button-at posn-point event-end button-get part-label part-menu-keymap popup-menu keymap append truncate-string-to-width 30 nil t] 13 (#$ . 534) "@e"]) #@36 (fn &optional POS TYPE NO-ERROR) (defalias 'sly-button-at #[768 "\301\206\302!\203\303\304!!\202`!\211\203+\203+\305\306\307\"\262\"\203+\207\211\203=\203=?\205J\310\311\"\207\211\203B\207?\205J\310\312!\207" [last-input-event button-at mouse-event-p posn-point event-end button-type-subtype-p button-get type error "[sly] Button at point is not of expected type %s" "[sly] No button at point"] 9 (#$ . 878)]) #@16 (fn BEG END) (defalias 'sly-button-buttons-in #[514 "\212eb\210\300\211\211\301\211\205 \301\262\302`\"\262\203)\303!b\210B\262\300\262\202\237\266\204)\207" [nil t next-button button-start] 9 (#$ . 1322)]) #@25 (fn ACTION LABEL KEY) (defalias 'sly-button-define-part-action '(macro . #[771 "\300\301\302\303\304\"\305\306\307\310\311\312 DED\313B\314\315\316\317\320\321\322\323\312DFD\324BBB\325BBBE\257\326\205U\327\330\312\331\332 \333\334\335\306\336\337\311\310\311\312DE\340BBBEE\257DFC\327\341\342 !\312\331\n\f\343\306\344\337\311\310\311\312DEEE\257DFC\"BB\207" [progn defun (button) format "%s the object under BUTTON." (interactive (list (sly-button-at))) let fn button-get button quote ((args (button-get button 'part-args))) if (and (sly-current-connection) (eq (button-get button 'sly-connection) (sly-current-connection))) cond ((and fn args) (apply fn args)) args sly-error "button of type `%s' doesn't implement `%s'" (button-type button) ((fn (sly-error "button %s doesn't have the `part-args' property" button))) ((sly-error (format "button is from an older connection"))) append define-key sly-part-button-keymap menu-item "" :filter lambda (cmd) ((button (sly-button-at))) and (cmd) sly-button-popup-part-menu-keymap vector :visible ((button (sly-button-at)))] 24 (#$ . 1551)])) #@47 Inspect the object under BUTTON. (fn BUTTON) (defalias 'sly-button-inspect #[257 "\300\301\"\300\302\"\303 \203=\300\304\"\303 =\203=\203$\211\203$\305\"\207\211\2034\306\307\300\310\"\262\301#\207\205B\306\311\"\207\306\312\313!!\207" [button-get sly-button-inspect part-args sly-current-connection sly-connection apply sly-error "button of type `%s' doesn't implement `%s'" type "button %s doesn't have the `part-args' property" format "button is from an older connection"] 9 (#$ . 2668) (byte-code "\300 C\207" [sly-button-at] 1)]) (byte-code "\302\303\304#\210\302 \305\306#\207" [sly-part-button-keymap sly-button-popup-part-menu-keymap define-key "i" (menu-item "" sly-button-inspect :filter (lambda (cmd) (let ((button (sly-button-at))) (and button (button-get button 'sly-button-inspect) cmd)))) [sly-button-inspect] (menu-item "Inspect" sly-button-inspect :visible (let ((button (sly-button-at))) (and button (button-get button 'sly-button-inspect))))] 4) #@48 Describe the object under BUTTON. (fn BUTTON) (defalias 'sly-button-describe #[257 "\300\301\"\300\302\"\303 \203=\300\304\"\303 =\203=\203$\211\203$\305\"\207\211\2034\306\307\300\310\"\262\301#\207\205B\306\311\"\207\306\312\313!!\207" [button-get sly-button-describe part-args sly-current-connection sly-connection apply sly-error "button of type `%s' doesn't implement `%s'" type "button %s doesn't have the `part-args' property" format "button is from an older connection"] 9 (#$ . 3658) (byte-code "\300 C\207" [sly-button-at] 1)]) (byte-code "\302\303\304#\210\302 \305\306#\207" [sly-part-button-keymap sly-button-popup-part-menu-keymap define-key "d" (menu-item "" sly-button-describe :filter (lambda (cmd) (let ((button (sly-button-at))) (and button (button-get button 'sly-button-describe) cmd)))) [sly-button-describe] (menu-item "Describe" sly-button-describe :visible (let ((button (sly-button-at))) (and button (button-get button 'sly-button-describe))))] 4) #@52 Pretty Print the object under BUTTON. (fn BUTTON) (defalias 'sly-button-pretty-print #[257 "\300\301\"\300\302\"\303 \203=\300\304\"\303 =\203=\203$\211\203$\305\"\207\211\2034\306\307\300\310\"\262\301#\207\205B\306\311\"\207\306\312\313!!\207" [button-get sly-button-pretty-print part-args sly-current-connection sly-connection apply sly-error "button of type `%s' doesn't implement `%s'" type "button %s doesn't have the `part-args' property" format "button is from an older connection"] 9 (#$ . 4657) (byte-code "\300 C\207" [sly-button-at] 1)]) (byte-code "\302\303\304#\210\302 \305\306#\207" [sly-part-button-keymap sly-button-popup-part-menu-keymap define-key "p" (menu-item "" sly-button-pretty-print :filter (lambda (cmd) (let ((button (sly-button-at))) (and button (button-get button 'sly-button-pretty-print) cmd)))) [sly-button-pretty-print] (menu-item "Pretty Print" sly-button-pretty-print :visible (let ((button (sly-button-at))) (and button (button-get button 'sly-button-pretty-print))))] 4) #@51 Show Source the object under BUTTON. (fn BUTTON) (defalias 'sly-button-show-source #[257 "\300\301\"\300\302\"\303 \203=\300\304\"\303 =\203=\203$\211\203$\305\"\207\211\2034\306\307\300\310\"\262\301#\207\205B\306\311\"\207\306\312\313!!\207" [button-get sly-button-show-source part-args sly-current-connection sly-connection apply sly-error "button of type `%s' doesn't implement `%s'" type "button %s doesn't have the `part-args' property" format "button is from an older connection"] 9 (#$ . 5692) (byte-code "\300 C\207" [sly-button-at] 1)]) (byte-code "\302\303\304#\210\302 \305\306#\207" [sly-part-button-keymap sly-button-popup-part-menu-keymap define-key "v" (menu-item "" sly-button-show-source :filter (lambda (cmd) (let ((button (sly-button-at))) (and button (button-get button 'sly-button-show-source) cmd)))) [sly-button-show-source] (menu-item "Show Source" sly-button-show-source :visible (let ((button (sly-button-at))) (and button (button-get button 'sly-button-show-source))))] 4) #@52 Go To Source the object under BUTTON. (fn BUTTON) (defalias 'sly-button-goto-source #[257 "\300\301\"\300\302\"\303 \203=\300\304\"\303 =\203=\203$\211\203$\305\"\207\211\2034\306\307\300\310\"\262\301#\207\205B\306\311\"\207\306\312\313!!\207" [button-get sly-button-goto-source part-args sly-current-connection sly-connection apply sly-error "button of type `%s' doesn't implement `%s'" type "button %s doesn't have the `part-args' property" format "button is from an older connection"] 9 (#$ . 6718) (byte-code "\300 C\207" [sly-button-at] 1)]) (byte-code "\302\303\304#\210\302 \305\306#\207" [sly-part-button-keymap sly-button-popup-part-menu-keymap define-key "." (menu-item "" sly-button-goto-source :filter (lambda (cmd) (let ((button (sly-button-at))) (and button (button-get button 'sly-button-goto-source) cmd)))) [sly-button-goto-source] (menu-item "Go To Source" sly-button-goto-source :visible (let ((button (sly-button-at))) (and button (button-get button 'sly-button-goto-source))))] 4) #@85 Just like `make-text-button', but add sly-specifics. (fn BEG END &rest PROPERTIES) (defalias 'sly--make-text-button #[642 "\300\301\302\303 &\207" [apply make-text-button sly-connection sly-current-connection] 10 (#$ . 7746)]) #@33 (fn LABEL ACTION &rest PROPS) (defalias 'sly-make-action-button #[642 "\300\301\302\303\304\305\306\n\n&\n\207" [apply sly--make-text-button nil :type sly-action action mouse-action] 14 (#$ . 7985)]) (byte-code "\302\303\304\305\306\307%\210\310\311\312\313#\210\310\314\315\311\316\303\317\320\321\322& \210\302\323\324\325\306\307%\210\310\326\315\311\316\323\327\330\331\330\332\321\333\334 \335\336\330\337\340\337\341\337\342\337&\207" [sly-part-button-keymap sly-button-popup-part-menu-keymap custom-declare-face sly-action-face ((t (:inherit warning))) "Face for SLY buttons." :group sly define-button-type sly-button sly-button-search-id regular-button sly-action :supertype face mouse-face highlight sly-button-echo sly-button-echo-button sly-part-button-face ((t (:inherit font-lock-constant-face))) "Face for things which be interactively inspected, etc" sly-part action sly-button-inspect mouse-action keymap sly-button-echo-part part-menu-keymap help-echo "RET, mouse-2: Inspect object; mouse-3: Context menu" nil sly-button-describe sly-button-pretty-print sly-button-show-source] 26) #@89 (fn BUTTON &key (FACE \='highlight) (PATTERN \='(0.07 0.07 0.07 0.07)) TIMES TIMEOUT) (defalias 'sly-button-flash #[385 "\300\301\"\206\302A@\300\303\"\206\304A@\300\305\"A@\300\306\"A@\211\203L\211@\307>\2034\211AA\262\202!\310>A@\203C\311\262\202!\312\313@\"\210\202!\210\314\315!\316!\306\303\305 \301 &\n\207" [plist-member :face (nil highlight) :pattern (nil (0.07 0.07 0.07 0.07)) :times :timeout (:face :pattern :times :timeout :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:face :pattern :times :timeout)" sly-flash-region button-start button-end] 17 (#$ . 9099)]) #@15 (fn BUTTON) (defalias 'sly-button-echo-button #[257 "\300\301!\207" [sly-message "A sly button"] 3 (#$ . 9743)]) #@15 (fn BUTTON) (defalias 'sly-button-echo-part #[257 "\300!\210\301\302\303\"!\207" [sly-button-flash sly-message button-get part-label] 5 (#$ . 9864)]) #@82 Return overlays overlapping positions BEG and END (fn BEG END &optional FILTER) (defalias 'sly-button--overlays-in #[770 "\300\301\302\"\303\"\"\207" [cl-remove-if-not make-closure #[257 "\3011\302\303\304\"\262\305\"0\202\210\306\207\205 \300?\206 \300!\207" [V0 (error) button-type-subtype-p button-get type sly-button nil] 6 "\n\n(fn BUTTON)"] overlays-in] 8 (#$ . 10024)]) #@87 Return overlays contained entirely between BEG and END (fn BEG END &optional FILTER) (defalias 'sly-button--overlays-between #[770 "\300\301\302#\303#\"\207" [cl-remove-if-not make-closure #[257 "\302!\300Y\205 \303!\301X\207" [V0 V1 button-start button-end] 3 "\n\n(fn BUTTON)"] sly-button--overlays-in] 9 (#$ . 10421)]) #@76 Return overlays exactly between BEG and END (fn BEG END &optional FILTER) (defalias 'sly-button--overlays-exactly-at #[770 "\300\301\302#\303#\"\207" [cl-remove-if-not make-closure #[257 "\302!\300U\205 \303!\301U\207" [V0 V1 button-start button-end] 3 "\n\n(fn BUTTON)"] sly-button--overlays-in] 9 (#$ . 10758)]) #@57 Return overlays near POINT (fn &optional POINT FILTER) (defalias 'sly-button--overlays-at #[512 "\206`\300\301ST#\302\303\304$\207" [cl-sort sly-button--overlays-in > :key sly-button--level] 8 (#$ . 11087)]) (byte-code "\300\301\302\303#\300\207" [function-put sly-button--level gv-expander #[385 "\300\301\302$\207" [gv--defsetter sly-button--level #[514 "\300\301F\207" [overlay-put 'sly-button-level] 6 "\n\n(fn LEVEL BUTTON)"]] 7 "\n\n(fn DO &rest ARGS)"]] 4) #@15 (fn BUTTON) (defalias 'sly-button--level #[257 "\300\301\"\206\302\207" [overlay-get sly-button-level 0] 4 (#$ . 11568)]) (defvar sly-button--next-search-id 0) (defalias 'sly-button-next-search-id #[0 "T\211\207" [sly-button--next-search-id] 2]) #@19 (fn POS FILTER) (defalias 'sly-button--searchable-buttons-at #[514 "\300\301\302#\211\205\303!?\205\211\304\305\306\"\205)\203'!\205)C\"!\207" [sly-button-at sly-button no-error overlayp cl-remove-duplicates append sly-button--overlays-at] 9 (#$ . 11827)]) #@31 (fn &optional POINT FILTER) (defalias 'sly-button--searchable-buttons-starting-at #[512 "\206`\300\301\302\"\303\"\"\207" [cl-remove-if-not make-closure #[257 "\301!\300U\207" [V0 button-start] 3 "\n\n(fn BUTTON)"] sly-button--searchable-buttons-at] 8 (#$ . 12110)]) #@17 (fn N FILTER) (defalias 'sly-button--search-1 #[514 "\211\300V\262\203 \301\202\302\303\211\211\211\211\211\304\303\203`\202\262\n\211\300V\262\2032eU\2026dU?\205B\305  \\\306\"\262\n\211\300V\262\203R\307\202S\310\306\"\262\305\306\"\262\n\211\300V\262\203pdU\202seU\204\256\311 \206\312\"\262\203\244\203\244=\204\244\313@!=\203\244\262\303\211\262\202\245\304\203\256\303\262\202\207" [0 -1 1 nil t get-char-property sly-button-search-id next-single-char-property-change previous-single-char-property-change sly-button--searchable-buttons-at identity button-start] 14 (#$ . 12392)]) (byte-code "\300\301\302\303#\210\300\304\302\303#\207" [put sly-button-forward sly-button-navigation-command t sly-button-backward] 4) #@426 Go forward to Nth buttons verifying FILTER and echo it. With negative N, go backward. Visiting is done via the `sly-button-echo' property. If more than one button overlap the same region, the button starting before is visited first. If more than one button start at exactly the same spot, they are both visited simultaneously, `sly-button-echo' being passed a variable number of button arguments. (fn N &optional FILTER) (defalias 'sly-button-search #[513 "\301\302!\303\211C\303W\2037\304N\204\305`\"\206\"\306\"\262@\240\210\2037T\262\303\262\202\203X\307@!b\210\310\311\242\312\"\242\313\314\315\"A\"#\210\202\\\316\317!\210\303\207" [last-command 0 abs nil sly-button-navigation-command sly-button--searchable-buttons-starting-at sly-button--search-1 button-start apply button-get sly-button-echo cl-remove-if-not make-closure #[257 "\301!\301\300\242!U\207" [V0 button-start] 4 "\n\n(fn B)"] sly-user-error "No more buttons!"] 14 (#$ . 13189)]) #@181 Filter buttons considered by `sly-button-forward' Set to `sly-note-button-p' to only navigate compilation notes, or leave at `identity' to visit every `sly-button' in the buffer.' (defvar sly-button-filter-function 'identity (#$ . 14185)) #@59 Go to and describe the next button in the buffer. (fn N) (defalias 'sly-button-forward #[257 "\301\"\207" [sly-button-filter-function sly-button-search] 4 (#$ . 14430) "p"]) #@63 Go to and describe the previous button in the buffer. (fn N) (defalias 'sly-button-backward #[257 "\300[!\207" [sly-button-forward] 3 (#$ . 14613) "p"]) #@125 Non-nil if Sly-Interactive-Buttons mode is enabled. Use the command `sly-interactive-buttons-mode' to change this variable. (defvar sly-interactive-buttons-mode nil (#$ . 14775)) (make-variable-buffer-local 'sly-interactive-buttons-mode) #@630 Minor mode where text property SLY buttons exist This is a minor mode. If called interactively, toggle the `Sly-Interactive-Buttons mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `sly-interactive-buttons-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'sly-interactive-buttons-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312!\203@\313\314\315\316B\317\320$\210\321\322\203J\323\202K\324\"\210\325\326!\203m\302 \203_\211\302 \232\203m\327\330\203i\331\202j\332\333#\210\210\334 \210\207" [sly-interactive-buttons-mode local-minor-modes current-message toggle 1 nil t boundp delq fboundp add-function advice--add-function :filter-return #[0 "\300\301!\207" [advice--buffer-local filter-buffer-substring-function] 2] #[257 "\300\301\"\207" [advice--set-buffer-local filter-buffer-substring-function] 4 "\n\n(fn GV--VAL)"] substring-no-properties ((name . sly-remove-string-properties)) run-hooks sly-interactive-buttons-mode-hook sly-interactive-buttons-mode-on-hook sly-interactive-buttons-mode-off-hook called-interactively-p any message "Sly-Interactive-Buttons mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 15020) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar sly-interactive-buttons-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!\207" [sly-interactive-buttons-mode-map sly-interactive-buttons-mode-hook variable-documentation put "Hook run after entering or leaving `sly-interactive-buttons-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 sly-interactive-buttons-mode boundp provide sly-buttons] 6)