;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302\303\304#\210\300\305\303\304#\210\300\306\303\304#\210\300\307\303\304#\210\310\311\312\313\314DD\315\316\317\320\301&\210\310\321\312\313\322DD\323\316\324\320\301&\207" [require lispy cider-client nil t cider-connection cider-eval cider-find custom-declare-variable lispy-clojure-eval-method funcall function #[0 "\300\207" [cider] 1] "REPL used for eval." :type (choice (const :tag "CIDER" cider) (const :tag "UNREPL" spiral)) :group lispy-cider-connect-method #[0 "\300\207" [cider-jack-in] 1] "Function used to create a CIDER connection." (choice (const cider-jack-in) (const cider-connect) (function :tag "Custom"))] 8) #@32 Store the last evaluated *ns*. (defvar lispy--clojure-ns "user" (#$ . 749)) #@55 When there's only one (ns ...) in the buffer, use it. (defalias 'lispy--clojure-detect-ns #[0 "\212eb\210\302\303\304#\205\305\306!\302\303\304#?\205\211\211\262)\207" [clojure-namespace-name-regex lispy--clojure-ns re-search-forward nil t match-string-no-properties 4] 5 (#$ . 831)]) #@73 Nil if the Clojure middleware in "lispy-clojure.clj" wasn't loaded yet. (defvar lispy--clojure-middleware-loaded-p nil (#$ . 1130)) #@31 User facing eval. (fn E-STR) (defalias 'lispy-eval-clojure #[257 "\306 \210\307;\204(\310 \262\307\311\312 \313\314\"\216\212\315\316!\210\301 \210\310 *\262*\262\n\317=\2032\202M \203L\320\f\321=\203A\322\202B\323\324 \325 %\202M \326=\203W\327!\207 \330=\203a\331\332!\210\333=\203l\334!\207\331\"\207" [lispy-ignore-whitespace deactivate-mark major-mode lispy--clojure-middleware-loaded-p this-command current-prefix-arg lispy--clojure-detect-ns nil lispy--string-dwim t save-mark-and-excursion--save make-closure #[0 "\301\300!\207" [V0 save-mark-and-excursion--restore] 2] lispy--out-backward 1 clojurescript-mode format special-lispy-eval "(lispy-clojure/pp (lispy-clojure/reval %S %S :file %S :line %S))" "(lispy-clojure/reval %S %S :file %S :line %S)" buffer-file-name line-number-at-pos 7 kill-new 0 lispy--eval-clojure "(lispy-clojure/shadow-unmap *ns*)" spiral lispy--eval-clojure-spiral lispy-clojure-eval-method] 8 (#$ . 1268)]) #@25 Store a lambda to call. (defvar lispy--clojure-hook-lambda nil (#$ . 2244)) #@36 Call `lispy--clojure-hook-lambda'. (defalias 'lispy--clojure-eval-hook-lambda #[0 "\203  \210\301\302\303\304\"\207" [lispy--clojure-hook-lambda nil remove-hook nrepl-connected-hook lispy--clojure-eval-hook-lambda] 3 (#$ . 2326)]) (eval-after-load 'cider #[0 "\300\301\302\303#\210\300\301\304\305#\210\300\301\306\307#\210\300\301\310\311#\207" [cider-add-to-alist cider-jack-in-dependencies "org.tcrawley/dynapath" "0.2.5" "com.cemerick/pomegranate" "0.4.0" "compliment" "0.3.6" "me.raynes/fs" "1.4.6"] 4]) #@150 Eval STR as Clojure code. The result is a string. When ADD-OUTPUT is non-nil, add the standard output to the result. (fn STR &optional ADD-OUTPUT) (defalias 'lispy--eval-clojure #[513 "\305\306!\210\307=\204\310\311\312\"\210\313\314 @\2048\315\313\316\317 D\320\321EDF\310\322\323\324#\210\325 !\210\326\327 \"\202C\f\204?\312 \210\321\")\207" [major-mode deactivate-mark lispy--clojure-hook-lambda lispy-cider-connect-method lispy--clojure-middleware-loaded-p require cider clojurescript-mode add-hook cider-connected-hook lispy--clojure-middleware-load nil cider-connections lambda set-window-configuration current-window-configuration message lispy--eval-clojure-1 nrepl-connected-hook lispy--clojure-eval-hook-lambda t call-interactively format "Starting CIDER using %s ..."] 9 (#$ . 2846)]) (defvar lispy--clojure-errorp nil) #@23 (fn STR ADD-OUTPUT) (defalias 'lispy--eval-clojure-1 #[514 "\302\211;\203 \303!\206\225\302\304\305\"\211\262\203\202 \306\307\"\310 \"\311\312\"\313\235\2034\310!\202A\314\235\203@\315\202A\311\316\"\302\204Q\317\311\320\"!\207\203\220\311\321\"\211\262\203j\322\323\324#\325P\202k\326\317\203\214\3271\207\330!\302\211\331\332\"\"\266\2030\202\215\210\202\215!P\207\317!\266\207\207" [lispy--clojure-errorp lispy--clojure-ns nil lispy--eval-clojure-handle-ns string-match "\\`(lispy-clojure/\\(pp\\|reval\\)" format "(do %s)" lispy--eval-nrepl-clojure nrepl-dict-get "status" "namespace-not-found" "eval-error" t "value" lispy--clojure-pretty-string "err" "out" propertize face font-lock-string-face "\n" "" (error) read string-trim-left string-trim-right] 18 (#$ . 3700)]) #@12 (fn STR) (defalias 'lispy--eval-clojure-handle-ns #[257 "\301\302\"\204\301\303\"\205+\304\305\"\306\307\"\310\311\"\312\235\203(\313\310\314\"!\210\266\207" [lispy--clojure-ns string-match "\\`(ns \\([a-z-_0-9\\.]+\\)" "\\`(in-ns '\\([a-z-_0-9\\.]+\\)" match-string 1 lispy--eval-nrepl-clojure "user" nrepl-dict-get "status" "eval-error" error "err"] 7 (#$ . 4532)]) #@32 (fn STR &optional NAMESPACE) (defalias 'lispy--eval-nrepl-clojure #[513 "\300\301 #\207" [nrepl-sync-request:eval cider-current-connection] 6 (#$ . 4922)]) #@12 (fn STR) (defalias 'lispy--eval-clojure-spiral #[257 "\302 \303\304 @\236Ar\211q\210)\305\306C\306C\307\310 #\210\311\310\312\313\314\315\316\n #\317\315\320\f\f#&\210\211\242\204U\321 \204U \203M\322\302 \"A@ W\203U\323\306\324\"\210\2022\242\203a\242\325\242Q\207\211\242\207" [spiral-conn-id spiral-aux-sync-request-timeout current-time :repl-buffer spiral-projects-as-list #[257 "\300\301!!\207" [substring-no-properties spiral-ast-unparse-to-string] 4 "\n\n(fn NODE)"] nil spiral-loop--send :aux spiral-pending-eval-add :status :sent :eval-callback make-closure #[257 "\301\300!\240\207" [V0 V1] 4 "\n\n(fn EVAL-PAYLOAD)"] :stdout-callback #[385 "\301\211\242\300!P\240\207" [V0 V1] 6 "\n\n(fn STDOUT-PAYLOAD &rest _)"] input-pending-p time-subtract accept-process-output 0.01 "\n"] 19 (#$ . 5088)]) (defalias 'lispy--clojure-debug-quit #[0 "\212\302 \203\f\303 \210\202\304\305!\210\306\305!\210`)\307\310\311\312\313\314\"\315#\"\316\317\320\321\322\323\313\323\"\257\324\325 #\210\326!\210\3271E\330\331\332!)0\210\202F\210b\207" [cider--debug-mode-response nrepl-ongoing-sync-request lispy--leftp forward-list lispy--out-forward 1 lispy-up format "(do %s)" mapconcat #[257 "\300\301@A@#\207" [format "(def %s %s)"] 5 "\n\n(fn X)"] nrepl-dict-get "locals" "\n" nrepl-send-request "op" "debug-input" "input" ":quit" "key" #[257 "\300\207" [nil] 2 "\n\n(fn RESPONSE)"] cider-current-connection lispy--eval-clojure (error) nil cider--debug-mode -1] 11]) #@198 Return resolved SYMBOL. Return 'special or 'keyword appropriately. Otherwise try to resolve in current namespace first. If it doesn't work, try to resolve in all available namespaces. (fn SYMBOL) (defalias 'lispy--clojure-resolve #[257 "\301\302\303\"!\203\304!\207\305\306\"\203\307\310\"\207\311!\207" [lispy--clojure-errorp lispy--eval-clojure format "(lispy-clojure/resolve-sym '%s)" user-error string-match "^#'\\(.*\\)$" match-string 1 read] 5 (#$ . 6592)]) #@15 (fn SYMBOL) (defalias 'lispy--clojure-symbol-to-args #[257 "\211\300\230\203 \301 \207\302\303\"\203\304\305\306\"!\207\307!\211\310\267\2020\311\312\313\314\"!!\207\315C\207\316\317!\207\211<\203?\211@\320=\203?\321C\207\311\312\313\314\"!!\207" ["." lispy--clojure-dot-args string-match "\\`\\(.*\\)\\.\\'" lispy--clojure-constructor-args match-string 1 lispy--clojure-resolve #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (special 32 keyword 41 undefined 44)) read lispy--eval-clojure format "(lispy-clojure/arglist '%s)" "[map]" error "Undefined" variable "variable"] 7 (#$ . 7073)]) #@135 Return a pretty string with arguments for SYMBOL. Besides functions, handles specials, keywords, maps, vectors and sets. (fn SYMBOL) (defalias 'lispy--clojure-args #[257 "\300!\211<\203#\301\302\303\304\305#\306\307\310\311\"\312\313\314\nG\\\315\"P##\207\303\304\305#\207" [lispy--clojure-symbol-to-args format "(%s %s)" propertize face lispy-face-hint mapconcat identity mapcar #[257 "\300\227\301\302#\207" [propertize face lispy-face-req-nosel] 5 "\n\n(fn X)"] "\n" make-string 2 32] 12 (#$ . 7720)]) #@58 Return description for Clojure Java symol SYM. (fn SYM) (defalias 'lispy--describe-clojure-java #[257 "\300\301\302\303\"!!\207" [read lispy--eval-clojure format "(let [[_ cname mname] (re-find #\"(.*)/(.*)\" \"%s\")\n methods (and cname\n (try (load-string (format \"(.getMethods %%s)\" cname))\n (catch Exception e)))\n methods (filter #(= (.getName %%) mname) methods)]\n (if (= 0 (count methods))\n nil\n (clojure.string/join\n \"\\n\" (map (fn [m] (.toString m))\n methods))))"] 6 (#$ . 8240)]) #@41 Test if SYMBOL is a macro. (fn SYMBOL) (defalias 'lispy--clojure-macrop #[257 "\300\301\302\"!\303\232\207" [lispy--eval-clojure format "(:macro (meta #'%s))" "true"] 5 (#$ . 8856)]) #@67 Mark the Clojure middleware in "lispy-clojure.clj" as not loaded. (defalias 'lispy--clojure-middleware-unload #[0 "\301\211\207" [lispy--clojure-middleware-loaded-p nil] 2 (#$ . 9047)]) #@17 (fn FILENAME) (defalias 'lispy-cider-load-file #[257 "\300 \301\302\303\304#\"\207" [cider-ns-form cider-map-repls :auto make-closure #[257 "\301\203 \303\301\"\210\304\305\300!\n\306\300!!\307\300!$\207" [V0 V1 cider-to-nrepl-filename-function cider-repl--cache-ns-form cider-request:load-file cider--file-string cider--server-filename file-name-nondirectory] 6 "\n\n(fn CONNECTION)"]] 8 (#$ . 9240)]) #@54 Load the custom Clojure code in "lispy-clojure.clj". (defalias 'lispy--clojure-middleware-load #[0 "?\205+\304\305 \306\307\"\216\310\311\312\n\"!\210)\210\313\314\315\316\"\210\317\320\321\322 \323#\"\324!\262\207" [lispy--clojure-middleware-loaded-p lispy--clojure-ns lispy-site-directory cider-jdk-src-paths "user" current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] lispy-cider-load-file expand-file-name "lispy-clojure.clj" t add-hook nrepl-disconnected-hook lispy--clojure-middleware-unload format "(do \n %s)" mapconcat #[257 "\300\301\"\207" [format "(cemerick.pomegranate/add-classpath %S)"] 4 "\n\n(fn P)"] "\n " lispy--eval-clojure] 6 (#$ . 9656)]) #@63 Inline a Clojure function at the point of its call. (fn ARG) (defalias 'lispy-flatten--clojure #[257 "\302!\203\n\303\202\304 \305 \"\203\306 \210\307\202\300\310!\311 \312!\313!\211@9\203<\314\315@!!\203<\316\317\320\"!\202B\316\317\321\"!@b\210@A|\210\211c\210\203W@b\210\266\322 \207" [lispy-left lispy-right looking-at t looking-back line-beginning-position backward-list nil 1 lispy--bounds-list lispy--string-dwim lispy--read lispy--clojure-macrop symbol-name lispy--eval-clojure format "(macroexpand '%s)" "(lispy-clojure/flatten-expr '%s)" lispy-alt-multiline] 9 (#$ . 10375)]) #@53 Inline a Clojure function at the point of its call. (defalias 'lispy--clojure-debug-step-in #[0 "\301 \210\302\303\304 \"\305\306!!\307 \210\310\311\"\203\312\313\"\306!\210\314\313!\207" [lispy--clojure-ns lispy--clojure-detect-ns format "(lispy-clojure/debug-step-in\n'%s)" lispy--string-dwim substring-no-properties lispy--eval-clojure lispy-follow string-match "(clojure.core/in-ns (quote \\([^)]+\\))" match-string 1 lispy-flow] 5 (#$ . 10991)]) #@13 (fn LINE) (defalias 'lispy-goto-line #[257 "eb\210\211Sy\207" [] 2 (#$ . 11455)]) #@21 (fn ARCHIVE PATH) (defalias 'lispy-find-archive #[514 "\302\303!\210\304\305#\306\307!\2066r\310!q\210\311\"\210\312!\210\313\300!\210\314!\313\301!\210\315\316\317!\210\320 \210p)!\207" [default-directory buffer-read-only require arc-mode format "%s:%s" switch-to-buffer find-buffer-visiting generate-new-buffer archive-zip-extract set-visited-file-name make-local-variable file-name-directory t set-buffer-modified-p nil set-auto-mode] 7 (#$ . 11545)]) #@27 Goto SYMBOL. (fn SYMBOL) (defalias 'lispy-goto-symbol-clojure #[257 "\300 \210\301\302\303\304\"!!\211@A@\305\306!\203\307!\210\310!\207\311\312\"\203?\306\313\314\"\211\262!\203?\313\315\"\316\"\210\310!\207\317\320\"\210\321!\207" [lispy--clojure-detect-ns read lispy--eval-clojure format "(lispy-clojure/location '%s)" nil file-exists-p find-file lispy-goto-line string-match "\\`file:\\([^!]+\\)!/\\(.*\\)\\'" match-string 1 2 lispy-find-archive warn "unexpected: %S" cider-find-var] 9 (#$ . 12019)]) #@27 Goto SYMBOL. (fn SYMBOL) (defalias 'lispy-goto-symbol-clojurescript #[257 "\300\301\"\207" [cider-find-var nil] 4 (#$ . 12550)]) (defalias 'lispy-clojure-complete-at-point #[0 "\302 @\205\345\3031\343\304 \210\305\306\307!\206``B\212\310\311!\210\312\313!)\203/\314\315\224@\"\316P\202M\212\317 \210\312\320!\205L\3211J\311u\210\322\323!\210\324 0\202L\210\325)\325\203\200\326\327\330\"!\211\262\203\200 \204\200\331!A@V\203u\332\324!\"\262@AE\262\202\336\212\310\323!\210\312\333!)\203\313\212\310\311!\210\325u\210\334\307\305\")\331\326\327\335\"!!GT\336\337\340\"\"A@V\203\276\332\324!\"\262@AE\266\204\202\336\324!\331\326\327\335\"!!@AE\266\202)\266\2030\207\210\325\207" [lispy-ignore-whitespace lispy--clojure-errorp cider-connections (error) lispy--clojure-detect-ns t bounds-of-thing-at-point symbol lispy--out-backward 1 looking-at "(\\.\\." buffer-substring-no-properties 0 ")" lispy--back-to-paren "(\\.[ \n ]" (error) forward-sexp 2 lispy--string-dwim nil lispy--eval-clojure format "(lispy-clojure/object-members %s)" read all-completions "(import" thing-at-point "(lispy-clojure/complete %S)" mapcar make-closure #[257 "\211\300\301O\207" [V0 nil] 4 "\n\n(fn S)"]] 10]) (defalias 'lispy--clojure-dot-args #[0 "\212\300 \210\301 \302\303\"\216\212\304\305!\210\306 *\262\301 \302\307\"\216\212\304\310!\210\306 *\262\311\312\313\314#!!\211G\315V\205b\316\317\"\203a\320\321\"\320\305\"\313\322G\315V\203Z\323P\202[\324%\266\205\202d\211\266\203)\207" [lispy--back-to-paren save-mark-and-excursion--save make-closure #[0 "\301\300!\207" [V0 save-mark-and-excursion--restore] 2] lispy-mark-list 2 lispy--string-dwim #[0 "\301\300!\207" [V0 save-mark-and-excursion--restore] 2] 3 read lispy--eval-clojure format "(lispy-clojure/method-signature (lispy-clojure/reval \"%s\" nil) \"%s\")" 0 string-match "\\`public \\(.*\\)(\\(.*\\))\\'" match-string 1 "%s\n(. %s %s%s)" " " ""] 12]) #@15 (fn SYMBOL) (defalias 'lispy--clojure-constructor-args #[257 "\300\301\302\303\"!!\207" [read lispy--eval-clojure format "(lispy-clojure/ctor-args %s)"] 6 (#$ . 14529)]) #@51 Return STR fontified in `clojure-mode'. (fn STR) (defalias 'lispy--clojure-pretty-string #[257 "\300\301\"\203\302\303\304\305#\306\307\"P\207\211G\310V\203\207\3111;\312\313\314\"r\211q\210\315\316\"\216\317 \210c\210\320 \210\321 *\2620\207\210\207" [string-match "\\`\"error: \\([^]+\\)\"\\'" propertize "error: " face error match-string 1 4000 (error) generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] clojure-mode lispy-font-lock-ensure buffer-string] 5 (#$ . 14708)]) #@10 (fn S) (defalias 'lispy-clojure-apropos-action #[257 "\300\301\302\"@\303\304O!\207" [cider-doc-lookup split-string "\\\\n" 2 nil] 5 (#$ . 15262)]) (defalias 'lispy-clojure-apropos #[0 "\300\301\302!\303\"\304\305\306\307$\207" [split-string lispy--eval-clojure "(lispy-clojure/all-docs 'clojure.core)" "::" ivy-read "var: " :action lispy-clojure-apropos-action] 6 nil nil]) (provide 'le-clojure)