;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\207" [require cider-client cider-popup cider-compat cider-util nrepl-dict subr-x easymenu thingatpt] 2) (defconst cider-browse-ns-buffer "*cider-ns-browser*") (defvar cider-browse-ns-current-ns nil nil) (make-variable-buffer-local 'cider-browse-ns-current-ns) (defvar cider-browse-ns-mode-map (byte-code "\302 \303 \"\210\304\305\306#\210\304\307\310#\210\304\311\312#\210\304\313\314#\210\304\315\316#\210\304\317\320#\210\321\322!\210\323\324\325\326$\210)\207" [map cider-popup-buffer-mode-map make-sparse-keymap set-keymap-parent define-key "d" cider-browse-ns-doc-at-point "s" cider-browse-ns-find-at-point " " cider-browse-ns-operate-at-point "^" cider-browse-ns-all "n" next-line "p" previous-line (lambda (def-tmp-var) (defvar cider-browse-ns-mode-menu def-tmp-var #1="Menu for CIDER's namespace browser")) nil easy-menu-do-define cider-browse-ns-mode-menu #1# ("Namespace Browser" ["Show doc" cider-browse-ns-doc-at-point] ["Go to definition" cider-browse-ns-find-at-point] "--" ["Browse all namespaces" cider-browse-ns-all])] 5)) (defvar cider-browse-ns-mouse-map (byte-code "\301 \302\303\304#\210)\207" [map make-sparse-keymap define-key [mouse-1] cider-browse-ns-handle-mouse] 4)) (defvar cider-browse-ns-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [cider-browse-ns-mode-hook variable-documentation put "Hook run after entering browse-ns mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp cider-browse-ns-mode-map definition-name cider-browse-ns-mode] 4) (defvar cider-browse-ns-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [cider-browse-ns-mode-abbrev-table cider-browse-ns-mode-map variable-documentation put purecopy "Keymap for `cider-browse-ns-mode'." boundp cider-browse-ns-mode-syntax-table definition-name cider-browse-ns-mode (lambda (def-tmp-var) (defvar cider-browse-ns-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `cider-browse-ns-mode'." (lambda (def-tmp-var) (defvar cider-browse-ns-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `cider-browse-ns-mode'." derived-mode-parent special-mode] 5) #@256 Major mode for browsing Clojure namespaces. \{cider-browse-ns-mode-map} In addition to any hooks its parent mode `special-mode' might have run, this mode runs the hook `cider-browse-ns-mode-hook', as the final or penultimate step during initialization. (defalias 'cider-browse-ns-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2036 \321 =\203<\322\f\323 \"\210)\324!\325\"\204V!\"=\204V\326!\325\"C#\210\327 !\210\330\f!\210!\"\306\331!\210\332\306\333!\210\334#\203|\306\335!\210\307\306\336!\210\332)\337\340!\207" [delay-mode-hooks major-mode mode-name cider-browse-ns-mode-map cider-browse-ns-mode-syntax-table parent make-local-variable t special-mode cider-browse-ns-mode "browse-ns" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table electric-indent-chars nil sesman-system CIDER truncate-lines cider-browse-ns-current-ns run-mode-hooks cider-browse-ns-mode-hook cider-browse-ns-mode-abbrev-table local-abbrev-table cider-special-mode-truncate-lines] 6 (#$ . 2697) nil]) #@289 Return font-lock-face for a var. VAR-META contains the metadata information used to decide a face. Presence of "arglists" and "macro" indicates a macro form. Only "arglists" indicates a function. Otherwise, its a variable. If the NAMESPACE is not loaded in the REPL, assume TEXT is a fn. (defalias 'cider-browse-ns--text-face #[(var-meta) "\204\301\207\302\303\"\203\304\305\"\306\230\203\307\207\302\303\"\203!\301\207\310\207" [var-meta font-lock-function-name-face nrepl-dict-contains "arglists" nrepl-dict-get "macro" "true" font-lock-keyword-face font-lock-variable-name-face] 3 (#$ . 3952)]) #@95 Decorate VAR with a clickable keymap and a face. VAR-META is used to decide a font-lock face. (defalias 'cider-browse-ns--properties #[(var var-meta) "\304!\305\n\306 \307\310\311 &)\207" [var-meta face var cider-browse-ns-mouse-map cider-browse-ns--text-face propertize font-lock-face mouse-face highlight keymap] 8 (#$ . 4567)]) #@280 Reset contents of BUFFER. Display TITLE at the top and ITEMS are indented underneath. If NS is non-nil, it is added to each item as the `cider-browse-ns-current-ns' text property. If NOERASE is non-nil, the contents of the buffer are not reset before inserting TITLE and ITEMS. (defalias 'cider-browse-ns--list #[(buffer title items &optional ns noerase) "rq\210\306 \210\307\n\204\310 \210db\210\311 \312\"\313\261\210\f\314\211\203<@\315\316 \313Q\317\n#c\210A\211\204$*eb*\207" [buffer inhibit-read-only noerase title items item cider-browse-ns-mode t erase-buffer cider-propertize ns "\n" nil propertize " " cider-browse-ns-current-ns --dolist-tail--] 5 (#$ . 4908)]) #@214 Return the first line of the given DOC string. If the first line of the DOC string contains multiple sentences, only the first sentence is returned. If the DOC string is nil, a Not documented string is returned. (defalias 'cider-browse-ns--first-doc-line #[(doc) "\203+\303\304\"\211@\305\306\n\"\203\n\307\211\225O\202) G\310U\203&\n\202)\n\311P*\207\312\207" [doc split-newline first-line split-string "\n" string-match "\\. " 0 1 "..." "Not documented."] 4 (#$ . 5607)]) #@143 Return the items to show in the namespace browser of the given NAMESPACE. Each item consists of a ns-var and the first line of its docstring. (defalias 'cider-browse-ns--items #[(namespace) "\303!\304\305 \"\306\307\n\"*\207" [namespace ns-vars-with-meta propertized-ns-vars cider-sync-request:ns-vars-with-meta nrepl-dict-map cider-browse-ns--properties mapcar #[(ns-var) "\304 \305D\"\211\205\306\n!\307\n! \310\311 \312\313#Q+\207" [ns-vars-with-meta ns-var doc first-doc-line nrepl-dict-get-in "doc" read cider-browse-ns--first-doc-line " " propertize font-lock-face font-lock-doc-face] 7]] 3 (#$ . 6099)]) #@38 List all NAMESPACE's vars in BUFFER. (defalias 'cider-browse-ns #[(namespace) "r\303\304\305\306$q\210\307p \310 !#\210\311\302!\210 \211)\207" [cider-browse-ns-buffer namespace cider-browse-ns-current-ns cider-popup-buffer select nil ancillary cider-browse-ns--list cider-browse-ns--items make-local-variable] 5 (#$ . 6725) (list (completing-read "Browse namespace: " (cider-sync-request:ns-list)))]) #@39 List all loaded namespaces in BUFFER. (defalias 'cider-browse-ns-all #[nil "r\303\304\305\306$q\210\307 \310p\311\312\313 \"#\210\314\302!\210\305\211*\207" [cider-browse-ns-buffer names cider-browse-ns-current-ns cider-popup-buffer select nil ancillary cider-sync-request:ns-list cider-browse-ns--list "All loaded namespaces" mapcar #[(name) "\301\302\"\207" [name cider-browse-ns--properties nil] 3] make-local-variable] 6 (#$ . 7135) nil]) #@80 Get the thing at point. Return a list of the type ('ns or 'var) and the value. (defalias 'cider-browse-ns--thing-at-point #[nil "\302\303\304\300!!\305\"@\306\307\"\203\310D\202%\311\312\313\314`\301\"\206\" #D)\207" [line cider-browse-ns-current-ns split-string string-trim thing-at-point " " string-match "\\." ns var format "%s/%s" get-text-property] 6 (#$ . 7588)]) #@56 Show the documentation for the thing at current point. (defalias 'cider-browse-ns-doc-at-point #[nil "\302 \211A@\303 !*\207" [thing value cider-browse-ns--thing-at-point cider-doc-lookup] 3 (#$ . 7972) nil]) #@180 Expand browser according to thing at current point. If the thing at point is a ns it will be browsed, and if the thing at point is some var - its documentation will be displayed. (defalias 'cider-browse-ns-operate-at-point #[nil "\303 \211@A@ \304=\203\305\n!\202\306\n!+\207" [thing type value cider-browse-ns--thing-at-point ns cider-browse-ns cider-doc-lookup] 3 (#$ . 8190) nil]) #@44 Find the definition of the thing at point. (defalias 'cider-browse-ns-find-at-point #[nil "\304 \211@A@ \305=\203\306\307\n\"\202\310 \n\"+\207" [thing type value current-prefix-arg cider-browse-ns--thing-at-point ns cider-find-ns nil cider-find-var] 4 (#$ . 8588) nil]) #@27 Handle mouse click EVENT. (defalias 'cider-browse-ns-handle-mouse #[(event) "\300 \207" [cider-browse-ns-operate-at-point] 1 (#$ . 8873) "e"]) (provide 'cider-browse-ns)