;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!\210\300\311!\210\300\312!\210\300\313!\210\314\315\316\317\320\321\322\323&\210\324\325\326\327\330DD\331\332\333\322\315\334\335& \207" [require cider-common subr-x cider-compat cider-util cider-popup cider-client cider-clojuredocs nrepl-dict button easymenu cider-browse-spec custom-declare-group cider-doc nil "Documentation for CIDER." :prefix "cider-doc-" :group cider custom-declare-variable cider-doc-auto-select-buffer funcall function #[0 "\300\207" [t] 1] "Controls whether to auto-select the doc popup buffer." :type boolean :package-version (cider . "0.15.0")] 10) #@29 CIDER documentation keymap. (defvar cider-doc-map (byte-code "\301\302\300!\210\303\304\305#\210\303\306\305#\210\303\307\310#\210\303\311\310#\210\303\312\313#\210\303\314\313#\210\303\315\316#\210\303\317\316#\210\303\320\321#\210\303\322\321#\210\303\323\324#\210\303\325\324#\210\303\326\327#\210\303\330\327#\210\303\331\332#\210\303\333\332#\210)\207" [cider-doc-map nil define-prefix-command define-key "a" cider-apropos "" "s" cider-apropos-select "" "f" cider-apropos-documentation "" "e" cider-apropos-documentation-select "" "d" cider-doc "" "c" cider-clojuredocs "" "w" cider-clojuredocs-web "" "j" cider-javadoc "\n"] 4) (#$ . 778)) #@30 CIDER documentation submenu. (defconst cider-doc-menu '("Documentation" ["CiderDoc" cider-doc] ["JavaDoc in browser" cider-javadoc] "--" ["Clojuredocs" cider-clojuredocs] ["Clojuredocs in browser" cider-clojuredocs-web] ["Refresh ClojureDocs cache" cider-clojuredocs-refresh-cache] "--" ["Search symbols" cider-apropos] ["Search symbols & select" cider-apropos-select] ["Search documentation" cider-apropos-documentation] ["Search documentation & select" cider-apropos-documentation-select] "--" ["Configure Doc buffer" (customize-group 'cider-docview-mode)]) (#$ . 1455)) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317\306\301\320\321& \210\322\323\324\325\306\301\320\326&\210\322\327\330\331\306\301\320\332&\210\322\333\334\335\306\301\320\336&\210\322\337\340\341\306\301\320\342&\207" [custom-declare-group cider-docview-mode nil "Formatting/fontifying documentation viewer." :prefix "cider-docview-" :group cider custom-declare-variable cider-docview-fill-column funcall function #[0 "\207" [fill-column] 1] "Fill column for docstrings in doc buffer." :type list :package-version (cider . "0.7.0") custom-declare-face cider-docview-emphasis-face ((t (:inherit default :underline t))) "Face for emphasized text" (cider . "0.7.0") cider-docview-strong-face ((t (:inherit default :underline t :weight bold))) "Face for strongly emphasized text" (cider . "0.7.0") cider-docview-literal-face ((t (:inherit font-lock-string-face))) "Face for literal text" (cider . "0.7.0") cider-docview-table-border-face ((t (:inherit shadow))) "Face for table borders" (cider . "0.7.0")] 10) #@35 Background color for code blocks. (defvar cider-docview-code-background-color (cider-scale-background-color) (#$ . 3083)) (byte-code "\300\301\302\303\304$\210\305\301\304\"\210\300\306\307\303\304$\210\305\306\304\"\207" [ad-add-advice enable-theme (cider-docview-adapt-to-theme nil t (advice lambda nil "When theme is changed, update `cider-docview-code-background-color'." (setq cider-docview-code-background-color (cider-scale-background-color)))) after nil ad-activate disable-theme (cider-docview-adapt-to-theme nil t (advice lambda nil "When theme is disabled, update `cider-docview-code-background-color'." (setq cider-docview-code-background-color (cider-scale-background-color))))] 5) (defvar cider-docview-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\320\321!\210\322\323\324\325$\210\207" [make-sparse-keymap define-key "q" cider-popup-buffer-quit-function "g" cider-docview-clojuredocs "G" cider-docview-clojuredocs-web "j" cider-docview-javadoc "s" cider-docview-source [backtab] backward-button " " forward-button (lambda (def-tmp-var) (defvar cider-docview-mode-menu def-tmp-var #1="Menu for CIDER's doc mode")) nil easy-menu-do-define cider-docview-mode-menu #1# ("CiderDoc" ["Look up in Clojuredocs" cider-docview-clojuredocs] ["Look up in Clojuredocs (browser)" cider-docview-clojuredocs-web] ["JavaDoc in browser" cider-docview-javadoc] ["Jump to source" cider-docview-source] "--" ["Quit" cider-popup-buffer-quit-function])] 6)) (defvar cider-docview-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-docview-mode-hook variable-documentation put "Hook run after entering Doc 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-docview-mode-map definition-name cider-docview-mode] 4) (defvar cider-docview-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-docview-mode-abbrev-table cider-docview-mode-map variable-documentation put purecopy "Keymap for `cider-docview-mode'." boundp cider-docview-mode-syntax-table definition-name cider-docview-mode (lambda (def-tmp-var) (defvar cider-docview-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `cider-docview-mode'." (lambda (def-tmp-var) (defvar cider-docview-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `cider-docview-mode'." derived-mode-parent help-mode] 5) #@251 Major mode for displaying CIDER documentation \{cider-docview-mode-map} In addition to any hooks its parent mode `help-mode' might have run, this mode runs the hook `cider-docview-mode-hook', as the final or penultimate step during initialization. (defalias 'cider-docview-mode #[0 "\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\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R $=\204R\326 \325$C#\210\327 !\210\330\f!\210 $\307%\306\331!\210\332&\203s\306\333!\210\307\306\334!\210\335\306\336!\210\335\306\337!\210\335\306\340!\210\335 \306\341!\210\335!)\342\343!\207" [delay-mode-hooks major-mode mode-name cider-docview-mode-map cider-docview-mode-syntax-table cider-docview-mode-abbrev-table make-local-variable t help-mode cider-docview-mode "Doc" 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 sesman-system CIDER truncate-lines electric-indent-chars nil cider-docview-symbol cider-docview-javadoc-url cider-docview-file cider-docview-line run-mode-hooks cider-docview-mode-hook local-abbrev-table buffer-read-only cider-special-mode-truncate-lines] 5 (#$ . 5901) nil]) #@55 Open the Javadoc for the current class, if available. (defalias 'cider-docview-javadoc #[0 "\203\302!\207\303\304 \"\207" [cider-docview-javadoc-url cider-docview-symbol browse-url error "No Javadoc available for %s"] 3 (#$ . 7256) nil]) #@75 Invoke the nREPL "info" op on SYMBOL-NAME if available. (fn SYMBOL-NAME) (defalias 'cider-javadoc-handler #[257 "\211\205\300!\301\302\"\211\203\303!\207\304\305\"\266\202\207" [cider-var-info nrepl-dict-get "javadoc" browse-url user-error "No Javadoc available for %s"] 6 (#$ . 7504)]) #@241 Open Javadoc documentation in a popup buffer. Prompts for the symbol to use, or uses the symbol at point, depending on the value of `cider-prompt-for-symbol'. With prefix arg ARG, does the opposite of what that option dictates. (fn ARG) (defalias 'cider-javadoc #[257 "\300 \210\301\302!\210\303!\304\305\"\207" [cider-ensure-connected cider-ensure-op-supported "info" cider-prompt-for-symbol-function "Javadoc for" cider-javadoc-handler] 4 (#$ . 7807) "P"]) #@55 Open the source for the current symbol, if available. (defalias 'cider-docview-source #[0 "\203'\303!?\205\304!\211\203!\305 \203 C\202\n\306#\207\307\310\311!!\207\312\313\n\"\207" [cider-docview-file cider-docview-line cider-docview-symbol cider--tooling-file-p cider-find-file cider-jump-to nil user-error substitute-command-keys "Can't find the source because it wasn't defined with `cider-eval-buffer'" error "No source location for %s"] 5 (#$ . 8276) nil]) #@66 Return the clojuredocs documentation for `cider-docview-symbol'. (defalias 'cider-docview-clojuredocs #[0 "\203\302 !\207\303\304 \"\207" [cider-buffer-ns cider-docview-symbol cider-clojuredocs-lookup error "%s cannot be looked up on ClojureDocs"] 3 (#$ . 8757) nil]) #@81 Open the clojuredocs documentation for `cider-docview-symbol' in a web browser. (defalias 'cider-docview-clojuredocs-web #[0 "\203\302 !\207\303\304 \"\207" [cider-buffer-ns cider-docview-symbol cider-clojuredocs-web-lookup error "%s cannot be looked up on ClojureDocs"] 3 (#$ . 9034) nil]) (defconst cider-doc-buffer "*cider-doc*") #@71 Populates *cider-doc* with the documentation for SYMBOL. (fn SYMBOL) (defalias 'cider-create-doc-buffer #[257 "\301!\211\205\302\303\304\305##\207" [cider-doc-buffer cider-var-info cider-docview-render cider-make-popup-buffer nil ancillary] 7 (#$ . 9376)]) #@48 Look up documentation for SYMBOL. (fn SYMBOL) (defalias 'cider-doc-lookup #[257 "\301!\211\203\f\302\"\207\303\304\"\207" [cider-doc-auto-select-buffer cider-create-doc-buffer cider-popup-buffer-display user-error "Symbol %s not resolved"] 5 (#$ . 9646)]) #@251 Open Clojure documentation in a popup buffer. Prompts for the symbol to use, or uses the symbol at point, depending on the value of `cider-prompt-for-symbol'. With prefix arg ARG, does the opposite of what that option dictates. (fn &optional ARG) (defalias 'cider-doc #[256 "\300 \210\301!\302\303\"\207" [cider-ensure-connected cider-prompt-for-symbol-function "Doc for" cider-doc-lookup] 4 (#$ . 9915) "P"]) #@265 Font lock BUFFER code blocks using MODE and remove markdown characters. This processes the triple backtick GFM markdown extension. An overlay is used to shade the background. Blocks are marked to be ignored by other fonification and line wrap. (fn BUFFER MODE) (defalias 'cider-docview-fontify-code-blocks #[514 "rq\210\212\301\302\303\304#\205<\305\306!\210`\307D\301\302\303\304#\2037\305\306!\210\310`#\210\311\312`\"\313#\210\314`\315\316$\210\266\202*\207" [cider-docview-code-background-color search-forward-regexp "```\n" nil t replace-match "" :background cider-font-lock-region-as overlay-put make-overlay font-lock-face put-text-property block code] 9 (#$ . 10336)]) #@128 Font lock BUFFER literal text and remove backtick markdown characters. Preformatted code text blocks are ignored. (fn BUFFER) (defalias 'cider-docview-fontify-literals #[257 "r\211q\210\212\300\301\302\303#\2059\304`\305\"\306=\203\302u\210\202\307\310!\210`\300\301\311 \303#\2035\307\310!\210\312`\313\314$\210\210\202*\207" [search-forward "`" nil t get-text-property block code replace-match "" line-end-position put-text-property font-lock-face cider-docview-literal-face] 7 (#$ . 11035)]) #@193 Font lock BUFFER emphasized text and remove markdown characters. One '*' represents emphasis, multiple '**'s represent strong emphasis. Preformatted code text blocks are ignored. (fn BUFFER) (defalias 'cider-docview-fontify-emphasis #[257 "r\211q\210\212\300\301\302\303#\205I\304`\305\"\306=\203\302u\210\202\307\310!\210`S\311\312!G\312V\203/\313\2020\314\300\315\316 \303#\203D\307\317!\210\320`\321$\210\266\202*\207" [search-forward-regexp "\\(*+\\)\\(\\w\\)" nil t get-text-property block code replace-match "\\2" match-string 1 cider-docview-strong-face cider-docview-emphasis-face "\\(\\w\\)\\*+" line-end-position "\\1" put-text-property font-lock-face] 8 (#$ . 11547)]) #@164 Align BUFFER tables and dim borders. This processes the GFM table markdown extension using `org-table'. Tables are marked to be ignored by line wrap. (fn BUFFER) (defalias 'cider-docview-format-tables #[257 "\300\301!\210r\211q\210\212\302\303\304\305\"!\262*\207" [require org-table cider-docview-table-border-face org-table-map-tables make-closure #[0 "\301 \210\302 b\210\303\304\305 \306#\203\307\310\224\310\225\311\300$\210\202\307\302 \305 \312\313$\207" [V0 org-table-align org-table-begin search-forward-regexp "[+|-]" org-table-end t put-text-property 0 font-lock-face block table] 5]] 6 (#$ . 12248)]) #@78 For text in BUFFER not propertized as 'block', apply line wrap. (fn BUFFER) (defalias 'cider-docview-wrap-text #[257 "r\211q\210\212m?\205\300`\301\"\204\302`\303 \"\210\304y\210\202*\207" [get-text-property block fill-region line-end-position nil] 4 (#$ . 12874)]) #@83 Emit into BUFFER formatted doc TEXT for a Java class or member. (fn BUFFER TEXT) (defalias 'cider-docview-render-java-doc #[514 "rq\210`c\210\212\211b\210\300\301\"\210\302!\210\303!\210\304!\210\305!)\262)\207" [cider-docview-fontify-code-blocks java-mode cider-docview-fontify-literals cider-docview-fontify-emphasis cider-docview-format-tables cider-docview-wrap-text] 6 (#$ . 13153)]) #@98 Abbreviate the file-path in `file:/path/to/file' of FILE-WITH-PROTOCOL. (fn FILE-WITH-PROTOCOL) (defalias 'cider--abbreviate-file-protocol #[257 "\300\301\"\203\302\303\"\304 \211\203\305\"\203\306\"\207\207\207" [string-match "\\`file:\\(.*\\)" match-string 1 clojure-project-dir file-in-directory-p file-relative-name] 6 (#$ . 13557)]) #@83 Emit into BUFFER formatted INFO for the Clojure or Java symbol. (fn BUFFER INFO) (defalias 'cider-docview-render-info #[514 "\301\302\"\301\303\"\301\304\"\301\305\"\301\306\"\301\307\"\301\310\"\301\311\"\211\205+\312\313\"\262\301 \314\"\211\205:\312\313\"\262\301\n\315\"\206E\316\301 \317\"\301\f\320\"\301 \321\"\301\322\"\301\323\"\301\324\"\301\325\"\203v\326Q\202x\203\205\326Q\202\207\301\327\"\330\331\332\333#D\334#\210rq\210\335\211\n\203\253\202\254\336\"\210\203\276\211\337\340\341\n\"P!\210\203\346\211\342\340\341 @\"P!\210A\211\203\345\211@\343\340\341\"P!\210A\266\202\202\317\210\204\357\203\362\313c\210 \206\371\f\211\203\211\211\203\211@\344c\210\345!!\210A\266\202\202\376\210\210\203 \211\346\347\"\210\203*\211\350\351\"\210\2034\211\352\347\"\210\203A\211\353P\354\"\210\203N\211\355P\347\"\210 \203\\\356p \"\210\202c\211\357 P!\210\n\203{\360c\210\361 \362 \363\364\365\366&\210\313c\210\203\222\367c\210\361\370\362\n\363\364\365\371&\210\372c\210\313c\210\203\271\211\373\336\"\210\374!c\210\375c\210\361\376\363\364\365\377\201@#%\210\375c\210\203\363\201A\230\204\363\201B\n\203\321\202\322\201C\336#\201D\261\210\361\201E!\363\364\365\201F%\210\201Gc\210\202\370\201Hc\210\203\201Ic\210\201J\377\201K\"\"\210\201L \210ed\201M\377\201N#\"\266p)\207" [cider-docview-file nrepl-dict-get "ns" "name" "added" "deprecated" "macro" "special-form" "built-in" "forms-str" split-string "\n" "arglists-str" "doc" "Not documented." "url" "class" "member" "javadoc" "super" "interfaces" "spec" "/" "see-also" cider--help-setup-xref cider-doc-lookup format "%s/%s" nil #[513 "\211\203\f\300\301#\202 \302\261\207" [propertize font-lock-face "\n"] 6 "\n\n(fn TEXT &optional FACE)"] font-lock-function-name-face " Extends: " cider-font-lock-as java-mode "Implements: " " " " " cider-font-lock-as-clojure "Special Form" font-lock-keyword-face "Macro" font-lock-variable-name-face "Built-in" "Added in " font-lock-comment-face "Deprecated in " cider-docview-render-java-doc " " "\n Please see " insert-text-button url follow-link t action #[257 "\300\301\302\"!\207" [browse-url button-get url] 5 "\n\n(fn X)"] "\n\nFor additional documentation, see the " "Javadoc" #[257 "\300\301\302\"!\207" [browse-url button-get url] 5 "\n\n(fn X)"] ".\n" "Spec:" cider-browse-spec--pprint-indented "\n\n" "Browse spec" make-closure #[257 "\302\303\304\300\301#!\207" [V0 V1 cider-browse-spec format "%s/%s"] 6 "\n\n(fn _)"] "" propertize font-lock-face " is defined in " cider--abbreviate-file-protocol #[257 "\300 \207" [cider-docview-source] 2 "\n\n(fn X)"] "." "Definition location unavailable." "\n\n Also see: " mapc #[257 "\301\302\"\211@A@\300\232\203\211\202\303\304\305\306\307\310\"%\266\311c\207" [V0 split-string "/" insert-text-button type help-xref help-function apply-partially cider-doc-lookup " "] 13 "\n\n(fn NS-SYM)"] cider--doc-make-xrefs nrepl-dict-map #[514 "\302\300\301$\207" [V0 V1 put-text-property] 7 "\n\n(fn K V)"]] 32 (#$ . 13915)]) #@86 Emit into BUFFER formatted documentation for SYMBOL's INFO. (fn BUFFER SYMBOL INFO) (defalias 'cider-docview-render #[771 "rq\210\305\306\"\305\307\"\305\310\"\305\311\"\312\313 \210\314!\210\315\301!\210\315\302!\210\315\303!\210\315\304!\210\316 \210\317\"\210eb\210p)\266\204)\207" [inhibit-read-only cider-docview-symbol cider-docview-javadoc-url cider-docview-file cider-docview-line nrepl-dict-get "javadoc" "file" "line" "ns" t cider-docview-mode cider-set-buffer-ns make-local-variable remove-overlays cider-docview-render-info] 10 (#$ . 17100)]) (provide 'cider-doc)