83
83
((lispy--clojure-middleware-loaded-p)
84
84
(format (if (memq this-command '(special-lispy-eval
85
85
special-lispy-eval-and-insert))
86
- " (lispy- clojure/pp (lispy- clojure/reval %S %S :file %S :line %S))"
87
- " (lispy- clojure/reval %S %S :file %S :line %S)" )
86
+ " (lispy. clojure/pp (lispy. clojure/reval %S %S :file %S :line %S))"
87
+ " (lispy. clojure/reval %S %S :file %S :line %S)" )
88
88
e-str
89
89
(condition-case nil
90
90
(let ((deactivate-mark nil ))
@@ -167,7 +167,7 @@ Add the standard output to the result."
167
167
(kill-new f-str))
168
168
((and (eq current-prefix-arg 0 )
169
169
(lispy--eval-clojure-cider
170
- " (lispy- clojure/shadow-unmap *ns*)" )
170
+ " (lispy. clojure/shadow-unmap *ns*)" )
171
171
nil ))
172
172
(t
173
173
(unless (lispy--clojure-middleware-loaded-p)
@@ -182,7 +182,7 @@ Add the standard output to the result."
182
182
(and (stringp add-output)
183
183
(lispy--eval-clojure-handle-ns add-output))
184
184
(let* (pp
185
- (stra (if (setq pp (string-match " \\ `(lispy- clojure/\\ (pp\\ |reval\\ )" str))
185
+ (stra (if (setq pp (string-match " \\ `(lispy. clojure/\\ (pp\\ |reval\\ )" str))
186
186
str
187
187
(format " (do %s ) " str)))
188
188
(res (lispy--eval-nrepl-clojure stra lispy--clojure-ns))
@@ -283,7 +283,7 @@ Add the standard output to the result."
283
283
(str (format " (do %s ) "
284
284
(mapconcat
285
285
(lambda (x )
286
- (format " (lispy- clojure/shadow-def '%s %s ) " (car x) (cadr x)))
286
+ (format " (lispy. clojure/shadow-def '%s %s ) " (car x) (cadr x)))
287
287
(nrepl-dict-get cider--debug-mode-response " locals" )
288
288
" \n " ))))
289
289
(catch 'exit
@@ -300,7 +300,7 @@ Return 'special or 'keyword appropriately.
300
300
Otherwise try to resolve in current namespace first.
301
301
If it doesn't work, try to resolve in all available namespaces."
302
302
(let ((str (lispy--eval-clojure-cider
303
- (format " (lispy- clojure/resolve-sym '%s ) " symbol))))
303
+ (format " (lispy. clojure/resolve-sym '%s ) " symbol))))
304
304
(cond
305
305
(lispy--clojure-errorp
306
306
(user-error str))
@@ -330,7 +330,7 @@ If it doesn't work, try to resolve in all available namespaces."
330
330
((eq sym 'special )
331
331
(read
332
332
(lispy--eval-clojure-cider
333
- (format " (lispy- clojure/arglist '%s ) " symbol))))
333
+ (format " (lispy. clojure/arglist '%s ) " symbol))))
334
334
((eq sym 'keyword )
335
335
(list " [map]" ))
336
336
((eq sym 'undefined )
@@ -340,7 +340,7 @@ If it doesn't work, try to resolve in all available namespaces."
340
340
(t
341
341
(read
342
342
(lispy--eval-clojure-cider
343
- (format " (lispy- clojure/arglist '%s ) " symbol)))))))))
343
+ (format " (lispy. clojure/arglist '%s ) " symbol)))))))))
344
344
345
345
(defun lispy--clojure-args (symbol )
346
346
" Return a pretty string with arguments for SYMBOL.
@@ -389,7 +389,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
389
389
(defvar cider-jdk-src-paths )
390
390
391
391
(defun lispy-cider-load-file (filename )
392
- (let ((ns-form (cider-ns-form)))
392
+ (let ((ns-form (cider-ns-form)))
393
393
(cider-map-repls :auto
394
394
(lambda (connection )
395
395
(when ns-form
@@ -431,7 +431,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
431
431
(lispy--eval-clojure-cider sources-expr)))
432
432
(when lispy-clojure-middleware-tests
433
433
(lispy-message
434
- (lispy--eval-clojure-cider " (lispy- clojure/run-lispy-tests)" )))))))
434
+ (lispy--eval-clojure-cider " (lispy. clojure/run-lispy-tests)" )))))))
435
435
436
436
(defun lispy-flatten--clojure (_arg )
437
437
" Inline a Clojure function at the point of its call."
@@ -450,7 +450,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
450
450
(lispy--eval-clojure-cider
451
451
(format " (macroexpand '%s ) " str))
452
452
(lispy--eval-clojure-cider
453
- (format " (lispy- clojure/flatten-expr '%s ) " str)))))
453
+ (format " (lispy. clojure/flatten-expr '%s ) " str)))))
454
454
(goto-char (car bnd))
455
455
(delete-region (car bnd) (cdr bnd))
456
456
(insert result)
@@ -461,7 +461,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
461
461
(defun lispy--clojure-debug-step-in ()
462
462
" Inline a Clojure function at the point of its call."
463
463
(lispy--clojure-detect-ns)
464
- (let* ((e-str (format " (lispy- clojure/debug-step-in\n '%s ) "
464
+ (let* ((e-str (format " (lispy. clojure/debug-step-in\n '%s ) "
465
465
(lispy--string-dwim)))
466
466
(str (substring-no-properties
467
467
(lispy--eval-clojure-cider e-str))))
@@ -495,7 +495,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
495
495
" Goto SYMBOL."
496
496
(lispy--clojure-detect-ns)
497
497
(let* ((r (read (lispy--eval-clojure-cider
498
- (format " (lispy- clojure/location '%s ) " symbol))))
498
+ (format " (lispy. clojure/location '%s ) " symbol))))
499
499
(url (car r))
500
500
(line (cadr r))
501
501
archive)
@@ -518,7 +518,8 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
518
518
519
519
(defun lispy-clojure-complete-at-point ()
520
520
(cond ((lispy-complete-fname-at-point))
521
- ((and (memq major-mode lispy-clojure-modes) (lispy--clojure-process-buffer))
521
+ ((and (memq major-mode lispy-clojure-modes)
522
+ (lispy--clojure-middleware-loaded-p))
522
523
(ignore-errors
523
524
(lispy--clojure-detect-ns)
524
525
(let* ((bnd (or (bounds-of-thing-at-point 'symbol )
@@ -540,7 +541,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
540
541
res)
541
542
(cond ((and obj
542
543
(setq res (lispy--eval-clojure-cider
543
- (format " (lispy- clojure/object-members %s ) " obj)))
544
+ (format " (lispy. clojure/object-members %s ) " obj)))
544
545
(null lispy--clojure-errorp))
545
546
(let ((cands (read res)))
546
547
(when (> (cdr bnd) (car bnd))
@@ -555,7 +556,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
555
556
(thing-at-point 'symbol t )))
556
557
(cands (read (lispy--eval-clojure-cider
557
558
(format
558
- " (lispy- clojure/complete %S)"
559
+ " (lispy. clojure/complete %S)"
559
560
prefix))))
560
561
(len (1+ (length prefix)))
561
562
(candsa (mapcar (lambda (s ) (substring s len)) cands)))
@@ -566,7 +567,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
566
567
(let* ((prefix (lispy--string-dwim bnd))
567
568
(res (lispy--eval-clojure-cider
568
569
(format
569
- " (lispy- clojure/complete %S)"
570
+ " (lispy. clojure/complete %S)"
570
571
prefix)))
571
572
(cands (and (null lispy--clojure-errorp) (read res))))
572
573
(list (car bnd) (cdr bnd) cands)))))))))
@@ -582,7 +583,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
582
583
(lispy--string-dwim)))
583
584
(sig (read
584
585
(lispy--eval-clojure-cider
585
- (format " (lispy- clojure/method-signature (lispy- clojure/reval \" %s \" nil) \" %s \" ) " object method)))))
586
+ (format " (lispy. clojure/method-signature (lispy. clojure/reval \" %s \" nil) \" %s \" ) " object method)))))
586
587
(when (> (length sig) 0 )
587
588
(if (string-match " \\ `public \\ (.*\\ )(\\ (.*\\ ))\\ '" sig)
588
589
(let ((name (match-string 1 sig))
@@ -596,7 +597,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
596
597
597
598
(defun lispy--clojure-constructor-args (symbol )
598
599
(read (lispy--eval-clojure-cider
599
- (format " (lispy- clojure/ctor-args %s ) " symbol))))
600
+ (format " (lispy. clojure/ctor-args %s ) " symbol))))
600
601
601
602
(defun lispy--clojure-pretty-string (str )
602
603
" Return STR fontified in `clojure-mode' ."
@@ -624,7 +625,7 @@ Besides functions, handles specials, keywords, maps, vectors and sets."
624
625
(interactive )
625
626
(let ((cands
626
627
(split-string (lispy--eval-clojure-cider
627
- " (lispy- clojure/all-docs 'clojure.core)" )
628
+ " (lispy. clojure/all-docs 'clojure.core)" )
628
629
" ::" )))
629
630
(ivy-read " var: " cands
630
631
:action #'lispy-clojure-apropos-action )))
0 commit comments