;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\307\310\311\312\313DD\314\315\316\317\320\321\322& \210\307\323\311\312\324DD\325\315\326\317\320\321\327& \207" [require subr-x cider-compat nrepl-dict cider-util etags tramp custom-declare-variable cider-prompt-for-symbol funcall function #[0 "\300\207" [nil] 1] "Controls when to prompt for symbol when a command requires one.\n\nWhen non-nil, always prompt, and use the symbol at point as the default\nvalue at the prompt.\n\nWhen nil, attempt to use the symbol at point for the command, and only\nprompt if that throws an error." :type (choice (const :tag "always" t) (const :tag "dwim" nil)) :group cider :package-version (cider . "0.9.0") cider-special-mode-truncate-lines #[0 "\300\207" [t] 1] "If non-nil, contents of CIDER's special buffers will be line-truncated.\nShould be set before loading CIDER." boolean (cider . "0.15.0")] 10) #@134 Return the value of the variable `cider-prompt-for-symbol'. Optionally invert the value, if INVERT is truthy. (fn &optional INVERT) (defalias 'cider--should-prompt-for-symbol #[256 "\211\203?\207\207" [cider-prompt-for-symbol] 2 (#$ . 1024)]) #@292 Prompt for symbol if funcall `cider--should-prompt-for-symbol' is truthy. Otherwise attempt to use the symbol at point for the command, and only prompt if that throws an error. INVERT is used to invert the semantics of the function `cider--should-prompt-for-symbol'. (fn &optional INVERT) (defalias 'cider-prompt-for-symbol-function #[256 "\300!\203\301\207\302\207" [cider--should-prompt-for-symbol cider-read-symbol-name cider-try-symbol-at-point] 3 (#$ . 1279)]) #@46 Convert the keyword KW to a symbol. (fn KW) (defalias 'cider--kw-to-symbol #[257 "\211\205 \300\301\302#\207" [replace-regexp-in-string "\\`:+" ""] 5 (#$ . 1756)]) #@55 History list of expressions read from the minibuffer. (defvar cider-minibuffer-history nil (#$ . 1929)) #@57 Minibuffer keymap used for reading Clojure expressions. (defvar cider-minibuffer-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\305#\210\207" [minibuffer-local-map make-sparse-keymap set-keymap-parent define-key " " complete-symbol [134217737]] 5) (#$ . 2039)) #@357 Read a string from the minibuffer, prompting with PROMPT. If VALUE is non-nil, it is inserted into the minibuffer as initial-input. PROMPT need not end with ": ". If it doesn't, VALUE is displayed on the prompt as a default value (used if the user doesn't type anything) and is not used as initial input (input is left empty). (fn PROMPT &optional VALUE) (defalias 'cider-read-from-minibuffer #[513 "\301\302\303!\211\304\305#M\210\304\306\"\216\307\310\"\210\311\312\"\313\203#\2026\2031\314\315#\2026\314\316\"\205;\317\320?\205F &\211\321\232\203\\\203\\\204\\\266\202\202_\211\266\202)\207" [cider-minibuffer-map #[0 "\302!\210\303\304\305\306\307$\210\310\301!\210\311\312\313!\207" [clojure-mode-syntax-table eldoc-documentation-function set-syntax-table add-hook completion-at-point-functions cider-complete-at-point nil t make-local-variable cider-eldoc run-hooks eval-expression-minibuffer-setup-hook] 5] make-symbol "minibuffer-setup" make-closure #[0 "\302\303\301\"\210\300 \207" [V0 V1 remove-hook minibuffer-setup-hook] 3] #[0 "\301\302\300\"\207" [V0 remove-hook minibuffer-setup-hook] 3] add-hook minibuffer-setup-hook string-match ": \\'" read-from-minibuffer format "%s (default %s): " "%s: " nil cider-minibuffer-history ""] 12 (#$ . 2321)]) #@141 Read a symbol name using PROMPT with a default of the one at point. Use CALLBACK as the completing read var callback. (fn PROMPT CALLBACK) (defalias 'cider-read-symbol-name #[514 "\211\300\301\302\303!!\"!\207" [cider-read-from-minibuffer cider--kw-to-symbol cider-symbol-at-point look-back] 8 (#$ . 3626)]) #@132 Call CALLBACK with symbol at point. On failure, read a symbol name using PROMPT and call CALLBACK with that. (fn PROMPT CALLBACK) (defalias 'cider-try-symbol-at-point #[514 "\3001 \211\301\302\303!!!0\207\210\211\304!!\207" ['error cider--kw-to-symbol cider-symbol-at-point look-back cider-read-from-minibuffer] 6 (#$ . 3943)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable cider-jump-to-pop-to-buffer-actions funcall function #[0 "\300\207" [((display-buffer-reuse-window display-buffer-same-window))] 1] "Determines what window `cider-jump-to` uses.\nThe value is passed as the `action` argument to `pop-to-buffer`.\n\nThe default value means:\n\n- If the target file is already visible in a window, reuse it (switch to it).\n- Otherwise, open the target buffer in the current window.\n\nFor further details, see https://docs.cider.mx/cider/repl/configuration.html#_control_what_window_to_use_when_jumping_to_a_definition" :type sexp :group cider :package-version (cider . "0.24.0")] 10) #@447 Push current point onto marker ring, and jump to BUFFER and POS. POS can be either a number, a cons, or a symbol. If a number, it is the character position (the point). If a cons, it specifies the position as (LINE . COLUMN). COLUMN can be nil. If a symbol, `cider-jump-to' searches for something that looks like the symbol's definition in the file. If OTHER-WINDOW is non-nil don't reuse current window. (fn BUFFER &optional POS OTHER-WINDOW) (defalias 'cider-jump-to #[769 "\302\303 \"\210\211\203\304\305\"\210\202\304 \"\210rq\210~\210eb\210\306\307!\210:\203C@\206/\307Sy\210A\203>\310A!\202\222\311 \202\222\247\203Mb\202\222\203\221\212\312\313\314\315!\"\316\317#)\204\200\320\321\322#\212\312\313\314\315!\"\316\317#)\206{\212\323\316\317#)\262\203\206\324\224b\202\222\325\326\327 #\210\330\202\222\330\211\330=?\205\233\331 \262)\207" [find-tag-marker-ring cider-jump-to-pop-to-buffer-actions ring-insert point-marker pop-to-buffer display-buffer-pop-up-window cider-mode 1 move-to-column back-to-indentation search-forward-regexp format "(def.*\\s-\\(%s\\)" regexp-quote nil noerror replace-regexp-in-string ".*/" "" search-forward 0 message "Can't find %s in %s" buffer-file-name not-found recenter] 9 (#$ . 4992)]) #@94 Return a buffer visiting FILE. If FILE is a temp buffer name, return that buffer. (fn FILE) (defalias 'cider--find-buffer-for-file #[257 "\300\301\"\203\207\211\205\302!?\205\303!\207" [string-prefix-p "*" cider--tooling-file-p cider-find-file] 4 (#$ . 6265)]) #@177 Jump to location give by INFO. INFO object is returned by `cider-var-info' or `cider-member-info'. OTHER-WINDOW is passed to `cider-jump-to'. (fn INFO &optional OTHER-WINDOW) (defalias 'cider--jump-to-loc-from-info #[513 "\300\301\"\300\302\"\300\303\"\304!\211\203#\305\203C\202#\207\306\307!\207" [nrepl-dict-get "line" "file" "name" cider--find-buffer-for-file cider-jump-to error "No source location"] 10 (#$ . 6543)]) #@313 Return the filename from the resource URL. Uses `url-generic-parse-url' to parse the url. The filename is extracted and then url decoded. If the decoded filename has a Windows device letter followed by a colon immediately after the leading '/' then the leading '/' is dropped to create a valid path. (fn URL) (defalias 'cider--url-to-file #[257 "\300\301\302!!!\303\304\"\203\305\306\"\207\207" [url-unhex-string url-filename url-generic-parse-url string-match "^/\\([a-zA-Z]:/.*\\)" match-string 1] 5 (#$ . 6989)]) #@254 Constructs a Tramp file prefix from METHOD, USER, HOST. It originated from Tramp's `tramp-make-tramp-file-name'. The original be forced to make full file name with `with-parsed-tramp-file-name', not providing prefix only option. (fn METHOD USER HOST) (defalias 'cider-make-tramp-prefix #[771 "G\306U?\205\f PG\306U?\205\nP\205*\307 \"\203)\f Q\202*\260\207" [tramp-prefix-format tramp-postfix-method-format tramp-postfix-user-format tramp-ipv6-regexp tramp-prefix-ipv6-format tramp-postfix-ipv6-format 0 string-match tramp-postfix-host-format] 9 (#$ . 7520)]) #@166 Use the filename for BUFFER to determine a tramp prefix. Defaults to the current buffer. Return the tramp prefix, or nil if BUFFER is local. (fn &optional BUFFER) (defalias 'cider-tramp-prefix #[256 "\211\206p\302!\206r\211q\210)\303!\205\242\304!\211\242 >\204(\305\306\307D\"\210\211A@\242 >\2049\305\306\307D\"\210\3108\242 >\204J\305\306\307D\"\210\3118\242 >\204\\\305\306\307D\"\210\3128\242 >\204n\305\306\307D\"\210\3138\242 >\204\200\305\306\307D\"\210\3148\242 >\204\224\305\306\307 D\"\210\3158\316#\266\210\207" [default-directory cl-struct-tramp-file-name-tags buffer-file-name tramp-tramp-file-p tramp-dissect-file-name signal wrong-type-argument tramp-file-name 2 3 4 5 6 7 cider-make-tramp-prefix] 15 (#$ . 8107)]) #@243 Return the tramp filename for path NAME relative to BUFFER. If BUFFER has a tramp prefix, it will be added as a prefix to NAME. If the resulting path is an existing tramp file, it returns the path, otherwise, nil. (fn NAME &optional BUFFER) (defalias 'cider--client-tramp-filename #[513 "\211\206p\300\301\302#\303!P\304!\205\211\207" [replace-regexp-in-string "^file:" "" cider-tramp-prefix tramp-handle-file-exists-p] 7 (#$ . 8894)]) #@64 Return the nREPL server-relative filename for NAME. (fn NAME) (defalias 'cider--server-filename #[257 "\301!\203\211\302!\211\242>\204\303\304\305D\"\210\211A@\242>\204(\303\304\305D\"\210\3068\242>\2049\303\304\305D\"\210\3078\242>\204K\303\304\305D\"\210\3108\242>\204]\303\304\305D\"\210\3118\242>\204o\303\304\305D\"\210\3128\242>\204\203\303\304\305 D\"\210\3138\207\207" [cl-struct-tramp-file-name-tags tramp-tramp-file-p tramp-dissect-file-name signal wrong-type-argument tramp-file-name 2 3 4 5 6 7] 12 (#$ . 9345)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable cider-path-translations funcall function #[0 "\300\207" [nil] 1] "Alist of path prefixes to path prefixes.\nUseful to intercept the location of a path in a container (or virtual\nmachine) and translate to the oringal location. If your project is located\nat \"~/projects/foo\" and the src directory of foo is mounted at \"/src\"\nin the container, the alist would be `((\"/src\" \"~/projects/foo/src\"))." :type (alist :key-type string :value-type string) :group cider :package-version (cider . "0.23.0")] 10) #@273 Attempt to translate the PATH in the given DIRECTION. Looks at `cider-path-translations' for (container . host) alist of path prefixes and translates PATH from container to host or viceversa depending on whether DIRECTION is 'from-nrepl or 'to-nrepl. (fn PATH DIRECTION) (defalias 'cider--translate-path #[514 "\211\301\267\202\302\202\303\202\304\305!\210\306\307\"\306\310\"\306\311\" !\312\313\314$\"\207" [cider-path-translations #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (from-nrepl 6 to-nrepl 10)) (car cdr identity) (cdr car expand-file-name) nil seqp seq--elt-safe 2 1 0 seq-some make-closure #[257 "\303\304\301!!!\305\302\"\205\306\307\310\311!\"\303\304\300!!!\302#\207" [V0 V1 V2 file-name-as-directory expand-file-name string-prefix-p replace-regexp-in-string format "^%s" regexp-quote] 8 "\n\n(fn TRANSLATION)"]] 16 (#$ . 10528)]) #@65 Attempt to translate the nREPL PATH to a local path. (fn PATH) (defalias 'cider--translate-path-from-nrepl #[257 "\300\301\"\207" [cider--translate-path from-nrepl] 4 (#$ . 11449)]) #@66 Attempt to translate the local PATH to an nREPL path. (fn PATH) (defalias 'cider--translate-path-to-nrepl #[257 "\300\301!\302\"\207" [cider--translate-path expand-file-name to-nrepl] 4 (#$ . 11639)]) #@61 Function to translate nREPL namestrings to Emacs filenames. (defvar cider-from-nrepl-filename-function #[257 "\301=\203\f\302!\202 \211\303!\206\211\207" [system-type cygwin cygwin-convert-file-name-from-windows cider--translate-path-from-nrepl] 4 "\n\n(fn PATH)"] (#$ . 11848)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable cider-prefer-local-resources funcall function #[0 "\300\207" [nil] 1] "Prefer local resources to remote (tramp) ones when both are available." :type boolean :group cider] 8) #@131 Return PATH's local or tramp path using `cider-prefer-local-resources'. If no local or remote file exists, return nil. (fn PATH) (defalias 'cider--file-path #[257 "!\211\205\n\302!\303\232\203\303\207 \203\304!\203\207\211\203)\304!\203)\207\2054\304!\2054\207" [cider-from-nrepl-filename-function cider-prefer-local-resources cider--client-tramp-filename "" file-exists-p] 5 (#$ . 12402)]) #@609 Return a buffer visiting the file URL if it exists, or nil otherwise. If URL has a scheme prefix, it must represent a fully-qualified file path or an entry within a zip/jar archive. If AVFS (archive virtual file system; see online docs) is mounted the archive entry is opened inside the AVFS directory, otherwise the entry is archived into a temporary read-only buffer. If URL doesn't contain a scheme prefix and is an absolute path, it is treated as such. Finally, if URL is relative, it is expanded within each of the open Clojure buffers till an existing file ending with URL has been found. (fn URL) (defalias 'cider-find-file #[257 "\303\304!\210\305\306\"\203 \307\310\311\"!\211\205\312!\211\205\313!\207\305\314\"\203\270\310\315\"\211\2055\307\310\316\"!\211\205<\312!\211\205E\317\320#\211\205X\317\321\322\323\324!\206S\325!$\211\205\267\326!\203f\313!\207\327!\206\267\330!\203\212\331!\210eb\210\332\333P!\210p\334 \210\335!\266p\207r\336\337!!q\210\340\341\"\210)\342!\210\343\301!\210\344!\343\302!\210\345\346\347!\210\350 \210p)\207\312!\211\203\303\313!\207\351!?\205@\352 \337!\347\211\211\211\211:\203 @\262rq\210\322!)\262\203\377\326!\203\377\313!\262\347\211\262\202\345\203 A\262\347\262\202\325\266\205\206>\347\211\211:\203<@\262\353!\230\2031\262\347\211\262\2022\345\203<A\262\202\266\203\266\202\207" [coding-system-for-read default-directory buffer-read-only require arc-mode string-match "^file:\\(.+\\)" cider--url-to-file match-string 1 cider--file-path find-file-noselect "^\\(jar\\|zip\\):\\(file:.+\\)!/\\(.+\\)" 3 2 format "%s:%s" "%s%s#uzip/%s" expand-file-name getenv "AVFSBASE" "~/.avfs/" file-exists-p find-buffer-visiting tramp-tramp-file-p find-file re-search-forward "$" archive-extract kill-buffer generate-new-buffer file-name-nondirectory prefer-utf-8 archive-zip-extract set-visited-file-name make-local-variable file-name-directory t set-buffer-modified-p nil set-auto-mode file-name-absolute-p cider-util--clojure-buffers buffer-name] 12 (#$ . 12822)]) #@92 Test prefix value ARG to see if it indicates displaying results in other window. (fn ARG) (defalias 'cider--open-other-window-p #[257 "\300!\211\301\267\202 \302\207\302\207\303\207" [prefix-numeric-value #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (-1 9 16 11)) t nil] 4 (#$ . 14928)]) #@61 Return a string that abbreviates NAMESPACE. (fn NAMESPACE) (defalias 'cider-abbreviate-ns #[257 "\211\205\300\301\302\"!\211@\303\304\300A!\305#P\266\202\207" [reverse split-string "\\." mapconcat #[257 "\211\300\301O\302P\207" [0 1 "."] 4 "\n\n(fn S)"] ""] 7 (#$ . 15265)]) #@55 Return the last segment of NAMESPACE. (fn NAMESPACE) (defalias 'cider-last-ns-segment #[257 "\211\205 \300\301\302\"!@\207" [reverse split-string "\\."] 5 (#$ . 15552)]) (provide 'cider-common)