;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib lv ring] 2) #@41 The keymap of the current Hydra called. (defvar hydra-curr-map nil (#$ . 168)) #@46 The on-exit predicate for the current Hydra. (defvar hydra-curr-on-exit nil (#$ . 253)) #@37 The current :foreign-keys behavior. (defvar hydra-curr-foreign-keys nil (#$ . 347)) #@38 The current hydra-.../body function. (defvar hydra-curr-body-fn nil (#$ . 437)) #@115 If a Hydra head sets this to t, exit the Hydra. This will be done even if the head wasn't designated for exiting. (defvar hydra-deactivate nil (#$ . 524)) #@114 Amaranth Warning message. Shown when the user tries to press an unbound/non-exit key while in an amaranth head. (defvar hydra-amaranth-warn-message "An amaranth Hydra can only exit through a blue head" (#$ . 686)) #@379 Set KEYMAP to the highest priority. Call ON-EXIT when the KEYMAP is deactivated. FOREIGN-KEYS determines the deactivation behavior, when a command that isn't in KEYMAP is called: nil: deactivate KEYMAP and run the command. run: keep KEYMAP and run the command. warn: keep KEYMAP and issue a warning instead of running the command. (fn KEYMAP ON-EXIT &optional FOREIGN-KEYS) (defalias 'hydra-set-transient-map #[770 "\203\304 \207\211\305\306\307\"\210\310\311\"\207" [hydra-deactivate hydra-curr-map hydra-curr-on-exit hydra-curr-foreign-keys hydra-keyboard-quit add-hook pre-command-hook hydra--clearfun internal-push-keymap overriding-terminal-local-map] 6 (#$ . 908)]) #@60 Disable the current Hydra unless `this-command' is a head. (defalias 'hydra--clearfun #[0 "\304=?\2052\305>\2040 \2030\306\n\307 \"=\206, \310\267\202+\311\211\202,\312\202,\313?\2052\314 \207" [this-command overriding-terminal-local-map hydra-curr-map hydra-curr-foreign-keys hydra-pause-resume (handle-switch-frame keyboard-quit) lookup-key this-single-command-keys #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (warn 33 run 39)) hydra-amaranth-warn t nil hydra-disable] 4 (#$ . 1599)]) #@48 When non-nil, don't call `hydra-curr-on-exit'. (defvar hydra--ignore nil (#$ . 2145)) #@48 Store overridden `input-method-function' here. (defvar hydra--input-method-function nil (#$ . 2237)) #@28 Disable the current Hydra. (defalias 'hydra-disable #[0 "\306\307\310\311\"\210 \2040\312\313!\203(\314\315\303!\316\"\211\315\303!=\204$\317\303\"\210\210\2020\n\2030\n\306\320 \211\203Y\211@\321 p\322\323#\216\324\325\"\210\f\203O\326 \304\"\210)\266A\266\202\2022\210\306 ?\205o\205o\306\211 \262\207" [hydra-deactivate hydra--ignore hydra--input-method-function input-method-function overriding-terminal-local-map hydra-curr-map nil remove-hook pre-command-hook hydra--clearfun fboundp remove-function advice--remove-function default-value hydra--imf set-default frame-list selected-frame make-closure #[0 "\302\300!\203 \303\300\304\"\210\305\301!\205\301q\207" [V0 V1 frame-live-p select-frame norecord buffer-live-p] 3] select-frame norecord internal-pop-keymap hydra-curr-on-exit] 8 (#$ . 2344)]) (byte-code "\300\301!\204 \302\301\303\"\210\300\304!\204\302\304\305\"\210\300\207" [fboundp internal-push-keymap defalias #[514 "\211J>?\205-\300J>\204$\301\302J\"\262\211\211\300AB\241\266L\210\211\211AB\241\262\207" [add-keymap-witness make-composed-keymap nil] 7 "\n\n(fn KEYMAP SYMBOL)"] internal-pop-keymap #[514 "\211J>\203\211\211\300A\"\241\266\211AA\211\203\301!\205*A@\302=\205*L\207" [delq keymapp add-keymap-witness] 8 "\n\n(fn KEYMAP SYMBOL)"]] 3) #@53 Issue a warning that the current input was ignored. (defalias 'hydra-amaranth-warn #[0 "\301!\207" [hydra-amaranth-warn-message message] 2 (#$ . 3680) nil]) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317\304\301&\210\310\320\312\313\321DD\322\316\323\304\301&\207" [custom-declare-group hydra nil "Make bindings that stick around." :group bindings :prefix "hydra-" custom-declare-variable hydra-is-helpful funcall function #[0 "\300\207" [t] 1] "When t, display a hint with possible bindings in the echo area." :type boolean hydra-default-hint #[0 "\300\207" [#1=""] 1 #1#] "Default :hint property to use for heads when not specified in\nthe body or the head." sexp] 8) #@47 List of parameters passed to `posframe-show'. (defvar hydra-posframe-show-params '(:internal-border-width 1 :internal-border-color "red" :poshandler posframe-poshandler-window-center) (#$ . 4397)) #@33 Timer for hiding posframe hint. (defvar hydra--posframe-timer nil (#$ . 4600)) #@12 (fn STR) (defalias 'hydra-posframe-show #[257 "\302\303!\210\203\f\304!\210\305\306\307\310\311 %\207" [hydra--posframe-timer hydra-posframe-show-params require posframe cancel-timer nil apply posframe-show " *hydra-posframe*" :string] 7 (#$ . 4685)]) (defalias 'hydra-posframe-hide #[0 "\301\302!\210?\205\303\304\305\306#\211\207" [hydra--posframe-timer require posframe run-with-idle-timer 0 nil #[0 "\301\302\303!\207" [hydra--posframe-timer nil posframe-hide " *hydra-posframe*"] 2]] 4]) #@52 Store the functions for `hydra-hint-display-type'. (defvar hydra-hint-display-alist (byte-code "\300\301\302E\303\304\305E\306\307\310EE\207" [lv lv-message lv-delete-window message #[257 "\300\301\"\207" [message "%s"] 4 "\n\n(fn STR)"] #[0 "\300\301!\207" [message ""] 2] posframe hydra-posframe-show hydra-posframe-hide] 5) (#$ . 5196)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315%\210\300\316\302\303\317DD\320\306\321%\210\300\322\302\303\323DD\324\306\321%\210\300\325\302\303\326DD\327\306\315%\210\330\316\331\332#\210\333\334\335\336\310\311%\210\333\337\340\341#\210\333\342\343\344#\210\333\345\346\347#\210\333\350\351\352#\207" [custom-declare-variable hydra-hint-display-type funcall function #[0 "\300\207" [lv] 1] "The utility to show hydra hint" :type (choice (const message) (const lv) (const posframe)) :group hydra hydra-verbose #[0 "\300\207" [nil] 1] "When non-nil, hydra will issue some non essential style warnings." boolean hydra-key-format-spec #[0 "\300\207" [#1="%s"] 1 #1#] "Default `format'-style specifier for _a_ syntax in docstrings.\nWhen nil, you can specify your own at each location like this: _ 5a_." string hydra-doc-format-spec #[0 "\300\207" [#2="%s"] 1 #2#] "Default `format'-style specifier for ?a? syntax in docstrings." hydra-look-for-remap #[0 "\300\207" [nil] 1] "When non-nil, hydra binding behaves as keymap binding with [remap].\nWhen calling a head with a simple command, hydra will lookup for a potential\nremap command according to the current active keymap and call it instead if\nfound" make-obsolete-variable "Since the docstrings are aligned by hand anyway, this isn't very useful." "0.13.1" custom-declare-face hydra-face-red ((t (:foreground "#FF0000" :bold t))) "Red Hydra heads don't exit the Hydra.\nEvery other command exits the Hydra." hydra-face-blue ((((class color) (background light)) :foreground "#0000FF" :bold t) (((class color) (background dark)) :foreground "#8ac6f2" :bold t)) "Blue Hydra heads exit the Hydra.\nEvery other command exits as well." hydra-face-amaranth ((t (:foreground "#E52B50" :bold t))) "Amaranth body has red heads and warns on intercepting non-heads.\nExitable only through a blue head." hydra-face-pink ((t (:foreground "#FF6EB4" :bold t))) "Pink body has red heads and runs intercepted non-heads.\nExitable only through a blue head." hydra-face-teal ((t (:foreground "#367588" :bold t))) "Teal body has blue heads and warns on intercepting non-heads.\nExitable only through a blue head."] 8) #@32 Fontify `defhydra' statements. (defalias 'hydra-add-font-lock #[0 "\300\301\302\"\207" [font-lock-add-keywords emacs-lisp-mode (("(\\(defhydra\\)\\_> +\\(.*?\\)\\_>" (1 font-lock-keyword-face) (2 font-lock-type-face)) ("(\\(defhydradio\\)\\_> +\\(.*?\\)\\_>" (1 font-lock-keyword-face) (2 font-lock-type-face)))] 3 (#$ . 7745)]) #@63 Add this to `emacs-lisp-mode-hook' to have hydras in `imenu'. (defalias 'hydra-add-imenu #[0 "\300\301\302\"\207" [add-to-list imenu-generic-expression ("Hydras" "^.*(\\(defhydra\\) \\([a-zA-Z-]+\\)" 2)] 3 (#$ . 8080)]) (eval-after-load 'find-func #[0 "\300\301\302\303\304$\210\305\301\304\"\210\301\207" [ad-add-advice find-function-search-for-symbol (hydra-around-find-function-search-for-symbol-advice nil t (advice lambda (symbol type library) "Navigate to hydras with `find-function-search-for-symbol'." (prog1 ad-do-it (when (symbolp symbol) (unless (cdr ad-return-value) (with-current-buffer (find-file-noselect library) (let ((sn (symbol-name symbol))) (when (and (null type) (string-match "\\`\\(hydra-[a-z-A-Z0-9]+\\)/\\(.*\\)\\'" sn) (re-search-forward (concat "(defhydra " (match-string 1 sn)) nil t)) (goto-char (match-beginning 0))) (cons (current-buffer) (point))))))))) around nil ad-activate] 5]) #@64 Keymap that all Hydras inherit. See `universal-argument-map'. (defvar hydra-base-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\307#\210\301\311\307#\210\301\312\307#\210\301\313\307#\210\301\314\307#\210\301\315\307#\210\301\316\307#\210\301\317\307#\210\301\320\307#\210\301\321\307#\210\301\322\307#\210\301\323\307#\210\301\324\307#\210\301\325\307#\210\301\326\307#\210\301\327\307#\210\301\330\307#\210\301\331\307#\210\301\332\307#\210\301\333\305#\210\207" [make-sparse-keymap define-key [21] hydra--universal-argument [45] hydra--negative-argument [48] hydra--digit-argument [49] [50] [51] [52] [53] [54] [55] [56] [57] [kp-0] [kp-1] [kp-2] [kp-3] [kp-4] [kp-5] [kp-6] [kp-7] [kp-8] [kp-9] [kp-subtract]] 5) (#$ . 9001)) #@50 Forward to (`universal-argument' ARG). (fn ARG) (defalias 'hydra--universal-argument #[257 "\211:\203 \301@_C\202\211\302=\203\303C\202\304\211\207" [prefix-arg 4 - -4 (4)] 3 (#$ . 9795) "P"]) #@46 Forward to (`digit-argument' ARG). (fn ARG) (defalias 'hydra--digit-argument #[257 "\250\203 \202\f\302N\303\304\"\305Z\250\203*\306_\307W\203%[\202&\\\202@\310=\203?\211\307U\203:\310\202@\211[\202@\211\211\207" [last-command-event prefix-arg ascii-character logand 127 48 10 0 -] 6 (#$ . 10004) "P"]) #@49 Forward to (`negative-argument' ARG). (fn ARG) (defalias 'hydra--negative-argument #[257 "\211\250\203\n\211[\202\211\301=\203\302\202\301\211\207" [prefix-arg - nil] 3 (#$ . 10335) "P"]) #@40 Prefix arg to use with `hydra-repeat'. (defvar hydra-repeat--prefix-arg nil (#$ . 10538)) #@37 Command to use with `hydra-repeat'. (defvar hydra-repeat--command nil (#$ . 10634)) #@102 Repeat last command with last prefix arg. When ARG is non-nil, use that instead. (fn &optional ARG) (defalias 'hydra-repeat #[256 "\211\305=\203\306\307\310!\"\204\n\202\211  \207" [last-command hydra-repeat--command last-prefix-arg hydra-repeat--prefix-arg current-prefix-arg 1 string-match "hydra-repeat$" symbol-name] 5 (#$ . 10725) "p"]) #@32 Test if X is callable. (fn X) (defalias 'hydra--callablep #[257 "\300!\206\211:\205\211@\301>\207" [functionp #'quote] 3 (#$ . 11087)]) #@174 Generate a callable symbol from X. If X is a function symbol or a lambda, return it. Otherwise, it should be a single statement. Wrap it in an interactive lambda. (fn X) (defalias 'hydra--make-callable #[257 "\2119\204 \300!\203\f\207\211:\203\211@\301=\203\211A@\207\302\303\304F\207" [functionp function lambda nil (interactive)] 5 (#$ . 11236)]) #@252 Extract a value from a property list. PLIST is a property list, which is a list of the form (PROP1 VALUE1 PROP2 VALUE2...). Return the value corresponding to PROP, or DEFAULT if PROP is not one of the properties on the list. (fn PLIST PROP DEFAULT) (defalias 'hydra-plist-get-default #[771 ">\203 \300\"\207\207" [plist-get] 6 (#$ . 11603)]) #@120 Return for Hydra head H the value of property PROP. Return DEFAULT if PROP is not in H. (fn H PROP &optional DEFAULT) (defalias 'hydra--head-property #[770 "\300AAA#\207" [hydra-plist-get-default] 7 (#$ . 11959)]) #@77 In hydra Head H, set a property PROP to the value VALUE. (fn H PROP VALUE) (defalias 'hydra--head-set-property #[771 "@\300A#B\207" [plist-put] 8 (#$ . 12183)]) #@63 Return non nil if heads H has the property PROP. (fn H PROP) (defalias 'hydra--head-has-property #[514 "\300A\"\207" [plist-member] 5 (#$ . 12355)]) #@59 Return what BODY does with a non-head binding. (fn BODY) (defalias 'hydra--body-foreign-keys #[257 "\300AA\301\"\206 \300AA\302\"\211\303\267\202\304\202\305\202\306\262\207" [plist-get :foreign-keys :color #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (amaranth 21 teal 21 pink 25)) warn run nil] 4 (#$ . 12513)]) #@46 Return the exit behavior of BODY. (fn BODY) (defalias 'hydra--body-exit #[257 "\300AA\301\"\206\300AA\302\"\211\303>\203\304\202\305\262\207" [plist-get :exit :color (blue teal) t nil] 4 (#$ . 12884)]) #@150 Put BODY in a normalized format. Add :exit and :foreign-keys if they are not there. Remove :color key. And sort the plist alphabetically. (fn BODY) (defalias 'hydra--normalize-body #[257 "\211AA\300\301\302!#\210\300\303\304!#\210\211\305\211\211\211:\203;\262\211A\262\242\262@\262BB\262AA\262\202\211\237\266\205\306\307\"\310\311\312\313$\314@A@D\315\316\"\"\207" [plist-put :exit hydra--body-exit :foreign-keys hydra--body-foreign-keys nil assq-delete-all :color cl-sort string< :key #[257 "\300@!\207" [symbol-name] 3 "\n\n(fn X)"] append cl-mapcan #[257 "\211@AD\207" [] 3 "\n\n(fn X)"]] 10 (#$ . 13103)]) (defalias 'hydra--imf 'list) #@54 Default setup that happens in each head before :pre. (defalias 'hydra-default-pre #[0 "\302=\205\303\304!\203\305\306\307\310B\311\312$\207 ?\205\312\211\207" [input-method-function hydra--input-method-function key-chord-input-method fboundp add-function advice--add-function :override #[0 "\300\301!\207" [default-value input-method-function] 2] #[257 "\300\301\"\207" [set-default input-method-function] 4 "\n\n(fn GV--VAL)"] hydra--imf nil] 5 (#$ . 13780)]) #@28 Timer for `hydra-timeout'. (defvar hydra-timeout-timer (byte-code "\300\301\302\211\211\211\211\211\211\211& \207" [vector t nil] 10) (#$ . 14258)) #@21 Timer for the hint. (defvar hydra-message-timer (byte-code "\300\301\302\211\211\211\211\211\211\211& \207" [vector t nil] 10) (#$ . 14412)) #@111 When non-nil, assume there's no bug in `pop-to-buffer'. `pop-to-buffer' should not select a dedicated window. (defvar hydra--work-around-dedicated t (#$ . 14560)) #@47 Quitting function similar to `keyboard-quit'. (defalias 'hydra-keyboard-quit #[0 "\306 \210\307!\210\307 !\210\n\203 \203\310\311\f \"8 \210\312\207" [hydra-timeout-timer hydra-message-timer hydra--ignore hydra--work-around-dedicated hydra-hint-display-type hydra-hint-display-alist hydra-disable cancel-timer 2 assoc nil] 4 (#$ . 14729) nil]) #@51 The formatter for each head of a plain docstring. (defvar hydra-head-format "[%s]: " (#$ . 15084)) #@44 The function for formatting key-doc pairs. (defvar hydra-key-doc-function 'hydra-key-doc-function-default (#$ . 15189)) #@36 (fn KEY KEY-WIDTH DOC DOC-WIDTH) (defalias 'hydra-key-doc-function-default #[1028 "\300\232\203\301\211\302\303\\\\\"\"\207<\203$\301\211\304\305Z#F\207\301\211\304\305Z##\207" [" " format "%%-%ds" 3 "%%%ds: %%%ds" -1] 10 (#$ . 15315)]) #@10 (fn X) (defalias 'hydra--to-string #[257 "\211;\203\207\300!\207" [eval] 3 (#$ . 15577)]) #@10 (fn X) (defalias 'hydra--eval-and-format #[257 "\301A!\302G\303V\203P\202\304@\"\207" [hydra-head-format hydra--to-string format 0 "%s"] 5 (#$ . 15678)]) #@143 Generate a hint for the echo area. BODY, and HEADS are parameters to `defhydra'. Works for heads without a property :column. (fn BODY HEADS) (defalias 'hydra--hint-heads-wocol #[514 "\300\211\203=\211@\301A@\"\302\"\203&\211AA@\303Q\240\266\2026A@AA@BBB\262\266A\266\202\202\210\304\305\"\237\306AA\307\"\300\203\224G\245T\310\311\304\312\"\"\310\311\304\313\"\"\314\315\316\317\304\320\321\316\320\322\323\324\325\326\327\330\257EE\331BBE\332\333  \f#DE\334BBBE\266\203\202\251\314\316\335\332D\336BBB\203\247\337\202\250\340E\262\341\342\304\343\"\"\203\272\344!\207\207" [nil assoc hydra-fontify-head " " mapcar cdr plist-get :columns apply max #[257 "\211@G\207" [] 2 "\n\n(fn X)"] #[257 "\300A!G\207" [hydra--to-string] 3 "\n\n(fn X)"] concat "\n" mapconcat #'identity lambda (x) (y) and y funcall hydra-key-doc-function (car y) (hydra--to-string (cdr y)) (x #1="") quote hydra--matrix ("\n") #'hydra--eval-and-format (", ") "." #1# cl-every stringp cddr eval] 27 (#$ . 15850)]) #@99 Generate a hint for the echo area. BODY, and HEADS are parameters to `defhydra'. (fn BODY HEADS) (defalias 'hydra--hint #[514 "\300\301!!\302\303\"\304\305\"\205\306\307!\"\205!\310@\"\204&\207\211;\2033\311\312C\"B\207\311\312A\"B\207" [hydra--sort-heads hydra--normalize-heads cl-remove-if-not #[257 "\300@\301\"\207" [hydra--head-property :column] 4 "\n\n(fn HEADS)"] cl-remove-if #[257 "\300@\301\"\207" [hydra--head-property :column] 4 "\n\n(fn HEADS)"] hydra--hint-from-matrix hydra--generate-matrix hydra--hint-heads-wocol concat append] 11 (#$ . 16894)]) #@56 Possible replacement for `hydra-fontify-head-default'. (defvar hydra-fontify-head-function nil (#$ . 17486)) #@121 Produce a pretty string from HEAD and BODY. HEAD's binding is returned as a string with a colored face. (fn HEAD BODY) (defalias 'hydra-fontify-head-default #[514 "\300!\301\302\"\211\203\303=\203\304\202(\305\202(\306\267\202'\307\202(\310\202(\311A@\2046\2046\312\313!\210\314\315\316\317@#\320\301\321\"\206f\322\267\202a\323\202f\324\202f\325\202f\326\202f\327\202f\330\331 \"#\207" [hydra--body-foreign-keys hydra--head-property :exit warn teal blue #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (warn 31 run 35)) amaranth pink red hydra--complain "nil cmd can only be blue" propertize replace-regexp-in-string "%" "%%" face :face #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (blue 77 red 81 amaranth 85 pink 89 teal 93)) hydra-face-blue hydra-face-red hydra-face-amaranth hydra-face-pink hydra-face-teal error "Unknown color for %S"] 11 (#$ . 17602)]) #@123 Produce a pretty string from HEAD and BODY. HEAD's binding is returned as a string wrapped with [] or {}. (fn HEAD BODY) (defalias 'hydra-fontify-head-greyscale #[514 "\300\301\302\"\203\f\303\202 \304@\"\207" [format hydra--head-property :exit "[%s]" "{%s}"] 6 (#$ . 18577)]) #@61 Produce a pretty string from HEAD and BODY. (fn HEAD BODY) (defalias 'hydra-fontify-head #[514 "\206\301\"\207" [hydra-fontify-head-function hydra-fontify-head-default] 5 (#$ . 18865)]) #@58 Remove ^ from STR, unless they're escaped: \^. (fn STR) (defalias 'hydra--strip-align-markers #[257 "\300\301\302#\211\262\2030\300\225\300\224Z\303=\203%\304\305\306\211$\262\211T\262\202\304\307\306\211$\262\202\207" [0 string-match "\\\\?\\^" 2 replace-match "^" nil ""] 7 (#$ . 19063)]) (defvar hydra-docstring-keys-translate-alist '(("↑" . "") ("↓" . "") ("→" . "") ("←" . "") ("⌫" . "DEL") ("⌦" . "") ("⏎" . "RET"))) #@55 Regex for the width spec in keys and %` quoted sexps. (defconst hydra-width-spec-regex " ?-?[0-9]*?" (#$ . 19557)) #@44 Regex for the key quoted in the docstring. (defvar hydra-key-regex "[][\\[:alnum:] ~.,;:/|?<>={}*+#%@!&^↑↓←→⌫⌦⏎'`()\"$-]+?" (#$ . 19678)) #@237 Generate a `format' statement from STR. "%`..." expressions are extracted into "%S". _NAME, BODY, DOCSTRING and HEADS are parameters of `defhydra'. The expressions can be auto-expanded according to NAME. (fn NAME BODY DOCSTRING HEADS) (defalias 'hydra--format #[1028 "\305\306\307\">?\205\245\310!\262\311\312\313#\262\314AA\315\"\316=\203%\317\202)\320\"\321\322\323 #\324\211\325\322\326\211##\211\262\203\234\327\321\"\330\230\203]\331\332\324\333\n$\262\321\225S\262\2021\327\321\"\321H\334=\203\244\327\335\"\336\"\211\203\227\3378B\262\331\n\206\213\340\327\341\f\"\342Q\333\324\f$\262 \266\2021\321\225\262\343\344\"\266\2021\327\321\"\321H\345=\203 \327\346\"\211\347\232\203\277\332\202\300\211\324\336\n\"\206\331\336 \"A\211\262\205\331\336\n\"\211\203\350\203\351AB\202\352 \"B\262\f\206\376\340\327\341 \"\342Q\331\333\324$\262\fG\\\262 \266\2021\321\225\262\343\351\"\266\2021\327\337\"\321H\352=\2030\353\2021\321\327\353 \"\211G\354\355\333\"r\211q\210\356\357\"\216\n\360\353\nG$\324Oc\210eb\210\361p!B\262`eZ*\262\262\211\321U\204x\211GSH\362U\204}\363P\262 \321O\340\f\360  \353 %\324OR\262\n\266\2021\364#\266\205\207" [hydra-width-spec-regex hydra-key-regex hydra-doc-format-spec hydra-docstring-keys-translate-alist hydra-key-format-spec elisp--witness--lisp mapcar cadr hydra--strip-align-markers replace-regexp-in-string "___" "_β_" plist-get :hint none "" hydra--hint 0 format "\\(%s\\)\\(%s\\)" nil string-match "\\(?:%%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_%s_\\)\\|\\(?:[?]%s[?]\\)\\|__" match-string "__" replace-match "_" t 63 6 assoc 2 "%" 3 "s" warn "Unrecognized key: ?%s?" 95 4 "β" hydra-fontify-head "Unrecognized key: _%s_" 96 1 generate-new-buffer " *temp*" make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] + read 115 "S" hydra--format-1] 22 (#$ . 19837)]) #@31 (fn DOCSTRING REST VARLIST) (defalias 'hydra--format-1 #[771 "\301\230\203\207<\203P\302\303\304\305#)\266\203\204\"\306P\262\307\303\304\305#)\266\203\204?A@\310\232\204?\310P\262\311\312\313\314\301#\237BBABB\207\315H\316=\203d\312\317\303OP\237BB\207\313\320\301\311\314\303\304\305#)\266\203\203\321\202\225\310\303\304\305#)\266\203\203\224\306\202\225\322\313\323\324\nFFF;\203\250\312\325!D\207\312D\207" [inhibit-changing-match-data "" "[:\n]" nil t string-match ":\n" "\n\\'" "\n" concat format replace-regexp-in-string "\\`\n" 0 10 1 " +$" ":" ": " "\\(%\\)" "\\1\\1" eval] 15 (#$ . 21815)]) #@105 Forward to (`message' FORMAT-STRING ARGS) unless `hydra-verbose' is nil. (fn FORMAT-STRING &rest ARGS) (defalias 'hydra--complain #[385 "\203\n\301\302#\207\301\303#\207" [hydra-verbose apply error message] 6 (#$ . 22483)]) #@179 Generate a part of Hydra docstring. BODY-KEY is the body key binding. BODY-NAME is the symbol that identifies the Hydra. HEADS is a list of heads. (fn BODY-KEY BODY-NAME HEADS) (defalias 'hydra--doc #[771 "\300\301\302\303\304#\300\305\"\203\300\306\"\202\307$\207" [format "The heads for the associated hydra are:\n\n%s\n\n%s%s." mapconcat #[257 "\300\301@A@#\207" [format "\"%s\": `%S'"] 5 "\n\n(fn X)"] ",\n" "The body can be accessed via `%S'" ", which is bound to \"%s\"" ""] 10 (#$ . 22721)]) #@119 `call-interactively' the given CMD or its remapped equivalent. Only when `hydra-look-for-remap' is non nil. (fn CMD) (defalias 'hydra--call-interactively-remap-maybe #[257 "\205\301!\211\203\302!\207\302!\207" [hydra-look-for-remap command-remapping call-interactively] 4 (#$ . 23244)]) #@95 Generate a `call-interactively' statement for CMD. Set `this-command' to NAME. (fn CMD NAME) (defalias 'hydra--call-interactively #[514 "\2119\203\211\300>\204\301\302\303\304DE\305\306DDE\207\305\306DD\207" [(nil body) progn setq this-command quote hydra--call-interactively-remap-maybe function] 7 (#$ . 23546)]) #@434 Make a defun wrapper, using NAME, BODY, DOC, HEAD, and KEYMAP. NAME and BODY are the arguments to `defhydra'. DOC was generated with `hydra--doc'. HEAD is one of the HEADS passed to `defhydra'. BODY-PRE is added to the start of the wrapper. BODY-BEFORE-EXIT will be called before the hydra quits. BODY-AFTER-EXIT is added to the end of the wrapper. (fn NAME BODY DOC HEAD KEYMAP BODY-PRE BODY-BEFORE-EXIT &optional BODY-AFTER-EXIT) (defalias 'hydra--make-defun #[2055 "\300 \"@\205\301A@!@\203$\302\303A@\f $\202+\302\304 \n#\305\302\306 \"!\307 !\310\f\311\"\nA@\312=\203L\310 \313\"\206S\310\314\f\233\313\"\305\302\315\"!\316\317\320\321DE\n\203{\322 \205t\323\nA@\"\fEC\202\211\205\211\323 A@\"CBB\324\325\326\327A@\312=?DC\330\317\320\321 DEF\n\205\264\331\332\323 A@\"\333BBB\203\306\334 \321DF\202\316\335\n\321DE\336\337\325\340F\f\205\340\321 DF\n\205\354\341 D\257\"\342\n\325\n\343\344\345\346\205C\347\350\"\351=\203\n\202/\347\350\"\325=\203 \202/\352\347\350\"\353 B\fBBBC\"BBBBBBB\207" [hydra--head-name hydra--make-callable format "Call the head `%S' in the \"%s\" hydra.\n\n%s" "Call the body in the \"%s\" hydra.\n\n%s" intern "%S/hint" hydra--body-foreign-keys plist-get :timeout body :idle 3 "%S/body" (hydra-keyboard-quit) setq hydra-curr-body-fn quote unwind-protect hydra--call-interactively delq nil let hydra--ignore (hydra-keyboard-quit) condition-case err (((quit error) (message (error-message-string err)))) hydra-idle-message hydra-show-hint hydra-set-transient-map lambda (hydra-keyboard-quit) hydra-timeout defun (interactive) (require 'hydra) (hydra-default-pre) append hydra--head-property :exit t if progn] 31 (#$ . 23876)]) (defvar hydra-props-alist nil) #@122 Set hydra property. NAME is the symbolic name of the hydra. KEY and VAL are forwarded to `plist-put'. (fn NAME KEY VAL) (defalias 'hydra-set-property #[771 "\301\"\302\204\303\300C\"\210\301\"\262A\262\304#\241\207" [hydra-props-alist assoc nil add-to-list plist-put] 10 (#$ . 25675)]) #@109 Get hydra property. NAME is the symbolic name of the hydra. KEY is forwarded to `plist-get'. (fn NAME KEY) (defalias 'hydra-get-property #[514 "\301\"\211\205 \302A\"\207" [hydra-props-alist assoc plist-get] 6 (#$ . 25987)]) #@20 (fn HINT CALLER) (defalias 'hydra-show-hint #[514 "\304\305\"A\306\"\211\307=\206(\211\310=\203\311\312!!\207 \205(\305\n \"A@\312!!\207" [hydra-props-alist hydra-is-helpful hydra-hint-display-type hydra-hint-display-alist plist-get assoc :verbosity 0 1 message eval] 6 (#$ . 26224)]) #@54 Transform SYM into a `funcall' to call it. (fn SYM) (defalias 'hydra--make-funcall '(macro . #[257 "\300\301\302DE\303\304\305\306\307CBDDCBEE\207" [when and symbolp setq \` funcall function \,] 10 (#$ . 26525)])) #@63 Return the symbol for head H of hydra with NAME. (fn H NAME) (defalias 'hydra--head-name #[514 "\300\301A@9\203A@\202,A@:\203(A@@\302=\203(A@A@\202,\303@P#\304\305\"\203AA@\306>\204A\211\307P\262\310!\207" [format "%S/%s" function "lambda-" hydra--head-property :exit (body nil) "-and-exit" intern] 7 (#$ . 26751)]) #@141 Return HEADS without entries that have the same CMD part. In duplicate HEADS, :cmd-name is modified to whatever they duplicate. (fn HEADS) (defalias 'hydra--delete-duplicates #[257 "\300\301\211\211\203P\211@\302A@\303\304\"B\"\211\262\2030\211AA\211\305AAA\306A#\241\266\202I\211A@\303\304\"B\307AAA\306\"BB\262\211B\262A\266\202\202\210\237\207" [(((hydra-repeat) . hydra-repeat)) nil assoc hydra--head-property :exit plist-put :cmd-name plist-get] 12 (#$ . 27094)]) #@46 Pad LST with nil until length N. (fn LST N) (defalias 'hydra--pad #[514 "G\211U\203\n\207\300\301Z\302\"\"\207" [append make-list nil] 8 (#$ . 27593)]) #@64 Return LST's first N elements while removing them. (fn LST N) (defalias 'hydra-multipop '(macro . #[514 "\300\301\302DE\303\304\305BBE\303\306\307\310D\303\n\304\f\307 EEEE\311BBEF\207" [if <= length prog1 setq (nil) setcdr nthcdr 1- (nil)] 17 (#$ . 27759)])) #@95 Create a matrix from elements of LST. The matrix size is ROWS times COLS. (fn LST ROWS COLS) (defalias 'hydra--matrix #[771 "\300!\301\302\211W\203=\301\303GX\203\301\262\202.S\n \233\262 \233\301\241\210\"B\262\210\211T\262\202\266\211\237\207" [copy-sequence nil 0 hydra--pad] 14 (#$ . 28039)]) #@198 Format a rectangular cell based on FSTR and NAMES. FSTR is a format-style string with two string inputs: one for the doc and one for the symbol name. NAMES is a list of variables. (fn FSTR NAMES) (defalias 'hydra--cell #[514 "\300\301\302\303$\304\305\306#\307#\207" [cl-reduce #[514 "\300!G]\207" [symbol-name] 4 "\n\n(fn ACC IT)"] :initial-value 0 mapconcat make-closure #[257 "\211\203\302\300\303\304\"\305!\211\306\301GZ\307\"P\262$\207\310\207" [V0 V1 format documentation-property variable-documentation symbol-name make-string 94 ""] 9 "\n\n(fn SYM)"] "\n"] 8 (#$ . 28371)]) #@124 Glue STRS vertically. They must be the same height. JOINER is a function similar to `concat'. (fn STRS &optional JOINER) (defalias 'hydra--vconcat #[513 "\211\206\300\262\301\302\303\304\305\306\"#\307#\207" [concat mapconcat #[257 "\300\301\"\203\302\303\304\211$\207\207" [string-match " +$" replace-match "" nil] 6 "\n\n(fn S)"] apply cl-mapcar mapcar #[257 "\300\301\"\207" [split-string "\n"] 4 "\n\n(fn S)"] "\n"] 10 (#$ . 28975)]) #@41 The default format for docstring cells. (defvar hydra-cell-format "% -20s %% -8`%s" (#$ . 29432)) #@319 Format a `format'-style table from variables in NAMES. The size of the table is ROWS times COLS. CELL-FORMATS are `format' strings for each column. If CELL-FORMATS is a string, it's used for all columns. If CELL-FORMATS is nil, `hydra-cell-format' is used for all columns. (fn NAMES ROWS COLS &optional CELL-FORMATS) (defalias 'hydra--table #[1027 "\211\204 \301\"\202\211;\203\301\"\202\211\262\302\303\304\305##\306\"\207" [hydra-cell-format make-list hydra--vconcat cl-mapcar hydra--cell hydra--matrix #[128 "\300\301\302#\207" [mapconcat identity " "] 5 "\n\n(fn &rest X)"]] 12 (#$ . 29537)]) #@105 Set variables NAMES to their defaults. NAMES should be defined by `defhydradio' or similar. (fn NAMES) (defalias 'hydra-reset-radios #[257 "\211\211\205\211@\211\300N\301HL\210A\266\202\202\207" [range 0] 6 (#$ . 30165)]) #@150 Ensure each head from HEADS have a property :column. Set it to the same value as preceding head or nil if no previous value was defined. (fn HEADS) (defalias 'hydra--normalize-heads #[257 "\300C\301\302\303\"\"\207" [nil mapcar make-closure #[257 "\301\302\"\203\300\303\302\"\240\210\304\302\300\242#\207" [V0 hydra--head-has-property :column hydra--head-property hydra--head-set-property] 5 "\n\n(fn HEAD)"]] 6 (#$ . 30401)]) #@151 Return a list of heads with non-nil doc grouped by column property. Each head of NORMALIZED-HEADS must have a column property. (fn NORMALIZED-HEADS) (defalias 'hydra--sort-heads #[257 "\300\301\"\302\303\304\"!\305\306\"\307\305\310\"\"\211\311\211\312@\313\"\311\211\211:\203V@\262\312\313\"\262\232\204AC\244\262\311\262C\244\262\262A\262\311\262\202 \314C\"\207" [cl-remove-if-not #[257 "\3008\207" [2] 3 "\n\n(fn HEAD)"] delete-dups mapcar #[257 "\300\301\"\207" [hydra--head-property :column] 4 "\n\n(fn HEAD)"] make-closure #[257 "\301\302\303\"\300\304\305$\207" [V0 cl-position hydra--head-property :column :test equal] 6 "\n\n(fn HEAD)"] cl-sort #[514 "\300!\300!W\207" [V0] 5 "\n\n(fn IT OTHER)"] nil hydra--head-property :column append] 15 (#$ . 30844)]) #@106 Return a copy of HEADS-GROUPS padded where applicable with PADDING-HEAD. (fn HEADS-GROUPS PADDING-HEAD) (defalias 'hydra--pad-heads #[514 "\300\211\301\302\303\304\"\"\300\211:\203E@\262G\262X\2035\305\306Z \"\"C\244\262\202;C\244\262A\262\300\262\202 \207" [nil apply max mapcar #[257 "\211G\207" [] 2 "\n\n(fn HEADS)"] append make-list] 14 (#$ . 31658)]) #@401 Return a copy of HEADS-GROUPS decorated with table formatting information. Details of modification: 2 virtual heads acting as table header were added to each heads-group. Each head is decorated with 2 new properties max-doc-len and max-key-len representing the maximum dimension of their owning group. Every heads-group have equal length by adding padding heads where applicable. (fn HEADS-GROUPS) (defalias 'hydra--generate-matrix #[257 "\211\205k\300\301\302\"\211\203f\211@\303@\304\"\305\306\307\310\"\"\305\306G\307\311\"#\312\300\304\313BBBBB\312\300\314\315\\\\\316\"\304\317BBBBB\320\305\321\n$!\307\322\323#\" B\262 \266A\266\202\202 \210\211\237\262\207" [nil hydra--pad-heads (" " nil " " :exit t) hydra--head-property :column apply max mapcar #[257 "\211@G\207" [] 2 "\n\n(fn X)"] #[257 "\300\3018!G\207" [hydra--to-string 2] 4 "\n\n(fn X)"] " " (:exit t) make-string 2 45 (:exit t) copy-tree list make-closure #[257 "\302\303\300#\210\302\304\301#\207" [V0 V1 hydra--head-set-property :max-key-len :max-doc-len] 5 "\n\n(fn IT)"]] 15 (#$ . 32053)]) #@54 Insert X in between each element of LST. (fn X LST) (defalias 'hydra-interpose #[514 "\300\211\211A\262\242\211\262\203\211B\262B\262\202A\237\207" [nil] 6 (#$ . 33154)]) #@19 (fn HEADS BODY) (defalias 'hydra--hint-row #[514 "\300\301\302\303\304\"\"\"\305!@;\2037\211G\306\307\310\305!@#S\233\211\240\262G\311U\2035\312Z\233\211\313\240\266\266\207" [hydra-interpose "| " mapcar make-closure #[257 " \302\300\"\303\304\"\211\305\306@\"\\\262\3078\303\310\"$\207" [V0 hydra-key-doc-function hydra-fontify-head hydra--head-property :max-key-len cl-count 37 2 :max-doc-len] 8 "\n\n(fn HEAD)"] last replace-regexp-in-string " +$" "" 0 2 "|"] 9 (#$ . 33345)]) #@273 Generate a formatted table-style docstring according to BODY and HEADS-MATRIX. HEADS-MATRIX is expected to be a list of heads with following features: Each heads must have the same length Each head must have a property max-key-len and max-doc-len. (fn BODY HEADS-MATRIX) (defalias 'hydra--hint-from-matrix #[514 "\211\205\300\"\301\302\301\303\304\"\"\305\"\262\207" [hydra--hint-from-matrix-1 append apply hydra-interpose ("\n") ("\n")] 9 (#$ . 33855)]) #@26 (fn BODY HEADS-MATRIX) (defalias 'hydra--hint-from-matrix-1 #[514 "\211@\211GS\300\301\302\"\211\203)\211@\303\304\305\"\"\306 \"B\262\210A\266\202\202\n\210\211\237\207" [nil number-sequence 0 mapcar make-closure #[257 "\3008\207" [V0] 3 "\n\n(fn HEADS)"] hydra--hint-row] 11 (#$ . 34323)]) #@52 In SECS seconds display HINT. (fn SECS HINT NAME) (defalias 'hydra-idle-message #[771 "\301!\210\302\303\304\211\211\211\211\211\211\211& \305\306\307 \"\"\210\310\311\312#\"\210\313!\207" [hydra-message-timer cancel-timer vector t nil timer-set-time timer-relative-time current-time timer-set-function make-closure #[0 "\303\300\301\"\210\304\n!\207" [V0 V1 hydra-message-timer hydra-show-hint cancel-timer] 3] timer-activate] 13 (#$ . 34635)]) #@136 In SECS seconds call FUNCTION, then function `hydra-keyboard-quit'. Cancel the previous `hydra-timeout'. (fn SECS &optional FUNCTION) (defalias 'hydra-timeout #[513 "\301!\210\302\303\304\211\211\211\211\211\211\211& \305\306\307 \"\"\210\310\311\304\205%\312D\313BBB\"\210\314!\207" [hydra-timeout-timer cancel-timer vector t nil timer-set-time timer-relative-time current-time timer-set-function lambda funcall ((hydra-keyboard-quit)) timer-activate] 12 (#$ . 35098)]) #@1852 Create a Hydra - a family of functions with prefix NAME. NAME should be a symbol, it will be the prefix of all functions defined here. BODY has the format: (BODY-MAP BODY-KEY &rest BODY-PLIST) DOCSTRING will be displayed in the echo area to identify the Hydra. When DOCSTRING starts with a newline, special Ruby-style substitution will be performed by `hydra--format'. Functions are created on basis of HEADS, each of which has the format: (KEY CMD &optional HINT &rest PLIST) BODY-MAP is a keymap; `global-map' is used quite often. Each function generated from HEADS will be bound in BODY-MAP to BODY-KEY + KEY (both are strings passed to `kbd'), and will set the transient map so that all following heads can be called though KEY only. BODY-KEY can be an empty string. CMD is a callable expression: either an interactive function name, or an interactive lambda, or a single sexp (it will be wrapped in an interactive lambda). HINT is a short string that identifies its head. It will be printed beside KEY in the echo erea if `hydra-is-helpful' is not nil. If you don't even want the KEY to be printed, set HINT explicitly to nil. The heads inherit their PLIST from BODY-PLIST and are allowed to override some keys. The keys recognized are :exit, :bind, and :column. :exit can be: - nil (default): this head will continue the Hydra state. - t: this head will stop the Hydra state. :bind can be: - nil: this head will not be bound in BODY-MAP. - a lambda taking KEY and CMD used to bind a head. :column is a string that sets the column for all subsequent heads. It is possible to omit both BODY-MAP and BODY-KEY if you don't want to bind anything. In that case, typically you will bind the generated NAME/body command. This command is also the return result of `defhydra'. (fn NAME BODY &optional DOCSTRING &rest HEADS) (defalias 'defhydra '(macro . #[898 "C\302!\262;\204*:\203\"@\303>\203\"\304\305!P\262\202*B\262\306\262\307\242@!\203;\211\310\211\242BB\240\210\211\311\242!\240\210\31219\313\314\315\"!\313\314\316\"!\242A@\242AA\305\317\320\"!\206f\321!\242@\206t\317\322\"\317\323\"C\317\324\"\317\325\"\206\212\317\326\"C\317\327\"C\317\330\"\331 \242!\332\242!\211\203\271\211@\333\334\305!!\"\262A\266\202\202\241\210\211\203\243\211@\211G\211\335W\203\323\336\337\"\266\202\200\211\335U\203\360A\340\341 #C\241\210AA\342D\241\266\202\200AA@\211\203\211;\204\211:\204\340\341 #A\343=?\205AAB\241\266\210AA\211A\204-\211\342D\241\266\202\200AAA\317\344\"\211\203i\345\342\346>\203F\347\202G\310#\210AA\211A@\344=\203_\211AAA\241\266\202\200\350A\344\"\266\202\200\340\342\351#\345\342\351=\203|\n\202}#\266\345AAA\352\353\"#\210\211A@\204\234\345AAA\342\347#\210A\266\202\202\274\210\354\f#\355!\356\357\360 \"\"\210\242\203\322\2429\203\322\361\362 \242DD\240\210\203\3459\203\345\361\362 DD\262\242\203\375\2429\203\375\361\362 \242DD\240\210\242\203\2429\203\361\362\242DD\240\210\363>\203%\364\365\"\204%\336\366\"\210\367\370\371\313\314\372\"!\310\314\373\"F\374\242DE\370\371\313\314\375\"!\310\314\376\"FE\370\371\313\314\377\"!\310\314\201@\"F\374\201A\201B\"DE\370\371\310\314\201C\"F\374DE\370\371\313\314\201D\"!\310\314\201E\"F\374\201F\242$DE\333\201A\357\201G& \"?\206\320?\206\320\201H!?\205\372\201I\201J\201K\201LDED\201M\201LD\201NBBBEC\201O\310\201A\357\201P#\"\"\201Q\242\201R\206%\242\242\201S&C$BBBBBB\266\2200\207\201T\201UA#\210\310\207" [hydra-base-map hydra-default-hint copy-tree (hydra--table concat format) "\n" eval "" keywordp nil hydra--normalize-body (debug error) intern format "%S/keymap" "%S/body" plist-get :base-map copy-keymap :bind :pre :body-pre :post :before-exit :after-exit :inherit hydra--body-foreign-keys hydra--body-exit append copy-sequence 2 error "Each head should have at least two items: %S" hydra-plist-get-default :hint :exit none :color plist-put (blue teal) t cl--do-remf default :cmd-name hydra--head-name hydra--doc hydra--delete-duplicates mapc make-closure #[257 "\301\300\302@!\303AAA\304\"#\207" [V0 define-key kbd plist-get :cmd-name] 7 "\n\n(fn X)"] funcall function (run warn) cl-some #[257 "\300\301\"\207" [hydra--head-property :exit] 4 "\n\n(fn H)"] "An %S Hydra must have at least one blue head in order to exit" progn set defvar "%S/params" "Params of %S." quote "%S/docstring" "Docstring of %S." "%S/heads" "Heads for %S." mapcar #[257 "\300!\211AA\211A@\301=\203\211AAA\241\266\207\302A\301\"\266\207" [copy-sequence :cmd-name cl--do-remf] 6 "\n\n(fn H)"] "Keymap for %S." "%S/hint" "Dynamic hint for %S." hydra--format #[257 "\307\300\301\242\306\302\303\242\304\242\305\242&\207" [V0 V1 V2 V3 V4 V5 V6 hydra--make-defun] 10 "\n\n(fn HEAD)"] hydra--callablep unless keymapp lookup-key kbd define-key (nil) delq #[257 "\302\303\"A@\205i\300\204\301\205i\302\304\301#\300\203'\305\306\300!\306@!\"\202+\306@!\2043\266\307\207\310!\203B\311\312DF\2079\203a\313!\203T\314J!\202U\315\203a\316\317DF\207\320\321#\266\202\207" [V0 V1 hydra--head-property :cmd-name :bind vconcat kbd nil hydra--callablep funcall function boundp keymapp t define-key quote error "Invalid :bind property `%S' for head %S"] 9 "\n\n(fn HEAD)"] hydra--make-defun (nil body) (setq prefix-arg current-prefix-arg) hydra--complain "Error in defhydra %S: %s"] 40 (#$ . 35587)])) (byte-code "\300\301\302\303#\300\301\304\305#\300\207" [function-put defhydra lisp-indent-function defun doc-string-elt 3] 5) #@134 Redefine an existing hydra by adding new heads. Arguments are same as of `defhydra'. (fn NAME BODY &optional DOCSTRING &rest HEADS) (defalias 'defhydra+ '(macro . #[898 ";\204 B\262\300\262\301\206\302\303\"\206!\302\304\"\305\306\302\n\307\"\"\310\311\312\313%BBBB\207" [nil defhydra hydra--prop "/params" "/docstring" cl-delete-duplicates append "/heads" :key car :test equal] 14 (#$ . 41322)])) (byte-code "\300\301\302\303#\300\301\304\305#\300\207" [function-put defhydra+ lisp-indent-function defun doc-string-elt 3] 5) #@23 (fn NAME PROP-NAME) (defalias 'hydra--prop #[514 "\300\301!P!J\207" [intern symbol-name] 5 (#$ . 41874)]) #@470 Create radios with prefix NAME. _BODY specifies the options; there are none currently. HEADS have the format: (TOGGLE-NAME &optional VALUE DOC) TOGGLE-NAME will be used along with NAME to generate a variable name and a function that cycles it with the same name. VALUE should be an array. The first element of VALUE will be used to inialize the variable. VALUE defaults to [nil t]. DOC defaults to TOGGLE-NAME split and capitalized. (fn NAME BODY &rest HEADS) (defalias 'defhydradio '(macro . #[642 "\300\301\302\301\303\304\305 \"\"\"\306\307\310\311 \"!\312\303\304\313 \"\"DEC\"B\207" [progn append apply mapcar make-closure #[257 "\301\300\"\207" [V0 hydra--radio] 4 "\n\n(fn H)"] defvar intern format "%S/names" quote #[257 "\301\302\303\300@#!\207" [V0 intern format "%S/%S"] 6 "\n\n(fn H)"]] 13 (#$ . 41991)])) (byte-code "\300\301\302\303#\300\207" [function-put defhydradio lisp-indent-function defun] 4) #@62 Generate a hydradio with PARENT from HEAD. (fn PARENT HEAD) (defalias 'hydra--radio #[514 "\211@\300\301\302#!A@AA@\206\303\304\305\306H!F\307\310D\311F\312\313\314\310 DDFE\207" [intern format "%S/%S" [nil t] defvar hydra--quote-maybe 0 put quote 'range defun nil hydra--cycle-radio] 14 (#$ . 42929)]) #@35 Quote X if it's a symbol. (fn X) (defalias 'hydra--quote-maybe #[257 "\211\204\300\207\2119\203\301D\207\207" [nil quote] 3 (#$ . 43252)]) #@51 Set SYM to the next value in its range. (fn SYM) (defalias 'hydra--cycle-radio #[257 "\211J\300N\301G\30220W\203*H\232\203#\303\302T\"\210\202\fT\262\202\f\304\305\"0\262Y\203>\301\202?HL\207" [range 0 done throw error "Val not in range for %S"] 9 (#$ . 43403)]) #@25 Ring for paused hydras. (defvar hydra-pause-ring (make-ring 10) (#$ . 43698)) #@171 Quit the current hydra and save it to the stack. If there's no active hydra, pop one from the stack and call its body. If the stack is empty, call the last hydra's body. (defalias 'hydra-pause-resume #[0 "\203\f\303 \n\"\210\304 \207\305 !\306U\203\n \207\307 \306\" \207" [hydra-curr-map hydra-pause-ring hydra-curr-body-fn ring-insert hydra-keyboard-quit ring-length 0 ring-remove] 3 (#$ . 43783) nil]) (provide 'hydra)