;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require cider-client cider-eval cider-scratch cider-profile] 2) #@41 The name of the selector's help buffer. (defconst cider-selector-help-buffer "*CIDER Selector Help*" (#$ . 218)) #@182 List of buffer-selection methods for the `cider-selector' command. Each element is a list (KEY DESCRIPTION FUNCTION). DESCRIPTION is a one-line description of what the key selects. (defvar cider-selector-methods nil (#$ . 338)) #@122 If non-nil use `switch-to-buffer-other-window'. Not meant to be set by users. It's used internally by `cider-selector'. (defvar cider-selector-other-window nil (#$ . 573)) #@355 Return the most recently visited buffer, deriving its `major-mode' from MODE. CONSIDER-VISIBLE-P will allow handling of visible windows as well. First pass only considers buffers that are not already visible. Second pass will attempt one of visible ones for scenarios where the window is visible, but not focused. (fn MODE &optional CONSIDER-VISIBLE-P) (defalias 'cider-selector--recently-visited-buffer #[513 "\301 \302\303\302:\203L@\262rq\210\304!)\203A\305\306!\302\303\307#)\266\203\204A\2047\310\311\"\204A\262\302\211\262\202B\303\203LA\262\202\203e\203]\312\313\"\210\202c\314\303\"\210\302\207\207" [inhibit-changing-match-data buffer-list nil t derived-mode-p "^ " buffer-name string-match get-buffer-window visible error "Can't find unshown buffer in %S" cider-selector--recently-visited-buffer] 13 (#$ . 753)]) #@344 Select a new buffer by type, indicated by a single character. The user is prompted for a single character indicating the method by which to choose a new buffer. The `?' character describes the available methods. OTHER-WINDOW provides an optional target. See `def-cider-selector-method' for defining new methods. (fn &optional OTHER-WINDOW) (defalias 'cider-selector #[256 "\302\303\304\305\306\307\"\"\"\210\211\310 \311\312\"\216\313\314 !\210\315 )\262\316\317\307$\211\2030\211AA@ \202A\302\320\"\210\321 \210\322\323!\210\324 \210\325 )\207" [cider-selector-methods cider-selector-other-window message "Select [%s]: " apply string mapcar car current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] select-window minibuffer-window read-char cl-find :key "No method for character: ?\\%c" ding sleep-for 1 discard-input cider-selector] 8 (#$ . 1620) nil]) #@359 Define a new `cider-select' buffer selection method. KEY is the key the user will enter to choose this method. DESCRIPTION is a one-line sentence describing how the method selects a buffer. BODY is a series of forms which are evaluated when the selector is chosen. The returned buffer is selected with `switch-to-buffer'. (fn KEY DESCRIPTION &rest BODY) (defalias 'def-cider-selector-method '(macro . #[642 "\300\301\302\303\304BDC\305BBE\306\307\310\311\312F\313 \314BBE\315BBE\207" [lambda nil let buffer progn ((cond ((not (and buffer (get-buffer buffer))) (message "No such buffer: %S" buffer) (ding)) ((get-buffer-window buffer) (select-window (get-buffer-window buffer))) (cider-selector-other-window (switch-to-buffer-other-window buffer)) (t (switch-to-buffer buffer)))) setq cider-selector-methods cl-sort cons list cl-remove (cider-selector-methods :key #'car) (#'< :key #'car)] 12 (#$ . 2535)])) (byte-code "\301\302\303\304E\305\302\306\307$B\310\306\307$\311\312\313\314E\306\307$\301\315\316\317E\305\315\306\307$B\310\306\307$\301\320\321\322E\305\320\306\307$B\310\306\307$\301\323\324\325E\305\323\306\307$B\310\306\307$\301\326\327\330E\305\326\306\307$B\310\306\307$\301\331\332\333E\305\331\306\307$B\310\306\307$\301\334\335\336E\305\334\306\307$B\310\306\307$\301\337\340\341E\305\337\306\307$B\310\306\307$\301\342\343\344E\305\342\306\307$B\310\306\307$\301\345\346\347E\305\345\306\307$B\310\306\307$\350\351!\207" [cider-selector-methods cl-sort 63 "Selector help buffer." #[0 "\3031\f\304!0\210\202 \210r\305!q\210\306c\210 \307\211\211\211:\203F@\262\211A\262\242\262\211A\262\242\262@\262\310\311#c\210A\262\202\266eb\210\312 \210\313p\314\"\210)\315 \210p\211\203b\316!\204j\317\320\"\210\321 \207\322!\203v\323\322!!\207\n\203~\324!\207\325!\207" [cider-selector-help-buffer cider-selector-methods cider-selector-other-window (error) kill-buffer get-buffer-create "CIDER Selector Methods:\n\n" nil format "%c: %s\n" help-mode display-buffer t cider-selector get-buffer message #1="No such buffer: %S" ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 9] cl-remove :key car < cl-adjoin 52 "Select in other window" #[0 "\300\301!\207" [cider-selector t] 2] 99 "Most recently visited clojure-mode buffer." #[0 "\301\302!\211\203 \303!\204\304\305\"\210\306 \207\307!\203!\310\307!!\207\203)\311!\207\312!\207" [cider-selector-other-window cider-selector--recently-visited-buffer clojure-mode get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 101 "Most recently visited emacs-lisp-mode buffer." #[0 "\301\302!\211\203 \303!\204\304\305\"\210\306 \207\307!\203!\310\307!!\207\203)\311!\207\312!\207" [cider-selector-other-window cider-selector--recently-visited-buffer emacs-lisp-mode get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 113 "Abort." #[0 "\301 \211\203\f\302!\204\303\304\"\210\305 \207\306!\203 \307\306!!\207\203(\310!\207\311!\207" [cider-selector-other-window top-level get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 114 "Current REPL buffer or as a fallback, the most recently\nvisited cider-repl-mode buffer." #[0 "\301 \206\302\303!\211\203\304!\204\305\306\"\210\307 \207\310!\203&\311\310!!\207\203.\312!\207\313!\207" [cider-selector-other-window cider-current-repl cider-selector--recently-visited-buffer cider-repl-mode get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 109 "Current connection's *nrepl-messages* buffer." #[0 "\301\302 !\211\203\303!\204\304\305\"\210\306 \207\307!\203\"\310\307!!\207\203*\311!\207\312!\207" [cider-selector-other-window nrepl-messages-buffer cider-current-repl get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 120 "*cider-error* buffer." #[0 "\211\203 \302!\204\303\304\"\210\305 \207\306!\203\307\306!!\207 \203'\310!\207\311!\207" [cider-error-buffer cider-selector-other-window get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 112 "*cider-profile* buffer." #[0 "\211\203 \302!\204\303\304\"\210\305 \207\306!\203\307\306!!\207 \203'\310!\207\311!\207" [cider-profile-buffer cider-selector-other-window get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 100 "*cider-doc* buffer." #[0 "\211\203 \302!\204\303\304\"\210\305 \207\306!\203\307\306!!\207 \203'\310!\207\311!\207" [cider-doc-buffer cider-selector-other-window get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] 115 "*cider-scratch* buffer." #[0 "\301 \211\203\f\302!\204\303\304\"\210\305 \207\306!\203 \307\306!!\207\203(\310!\207\311!\207" [cider-selector-other-window cider-scratch-find-or-create-buffer get-buffer message #1# ding get-buffer-window select-window switch-to-buffer-other-window switch-to-buffer] 4] provide cider-selector] 7)