@@ -209,11 +209,11 @@ be used instead of `comint-send-string`."
209
209
(inf-clojure--set-repl-type proc)
210
210
(comint-simple-send proc string))
211
211
212
- (defcustom inf-clojure-load-command " (clojure.core/load-file \" %s\" )\n "
212
+ (defcustom inf-clojure-load-form " (clojure.core/load-file \" %s\" )\n "
213
213
" Format-string for building a Clojure expression to load a file.
214
- This format string should use `%s' to substitute a file name
215
- and should result in a Clojure expression that will command the inferior Clojure
216
- to load that file."
214
+ This format string should use `%s' to substitute a file name and
215
+ should result in a Clojure form that will be sent to the inferior
216
+ Clojure to load that file."
217
217
:type 'string )
218
218
219
219
(defcustom inf-clojure-prompt " ^[^=> \n ]+=> *"
@@ -282,7 +282,7 @@ Runs a Clojure interpreter as a subprocess of Emacs, with Clojure
282
282
I/O through an Emacs buffer. Variables of the type
283
283
`inf-clojure-*-cmd' combined with the project type controls how
284
284
a Clojure REPL is started. Variables `inf-clojure-prompt' ,
285
- `inf-clojure-filter-regexp' and `inf-clojure-load-command ' can
285
+ `inf-clojure-filter-regexp' and `inf-clojure-load-form ' can
286
286
customize this mode for different Clojure REPLs.
287
287
288
288
For information on running multiple processes in multiple buffers, see
@@ -546,7 +546,7 @@ The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the
546
546
(setq inf-clojure-prev-l/c-dir/file (cons (file-name-directory file-name)
547
547
(file-name-nondirectory file-name)))
548
548
(inf-clojure--send-string (inf-clojure-proc)
549
- (format inf-clojure-load-command file-name))
549
+ (format inf-clojure-load-form file-name))
550
550
(when switch-to-repl
551
551
(inf-clojure-switch-to-repl t ))))
552
552
@@ -559,17 +559,17 @@ The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the
559
559
; ;; describe symbol.
560
560
; ;; ===========================================================================
561
561
562
- ; ;; Command strings
563
- ; ;; ===============
562
+ ; ;; Command forms
563
+ ; ;; =============
564
564
565
565
(defcustom inf-clojure-var-doc-form
566
566
" (clojure.repl/doc %s)\n "
567
- " Command to query inferior Clojure for a var's documentation."
567
+ " Form to query inferior Clojure for a var's documentation."
568
568
:type 'string )
569
569
570
570
(defcustom inf-clojure-var-doc-form-lumo
571
571
" (lumo.repl/doc %s)\n "
572
- " Lumo command to query inferior Clojure for a var's documentation."
572
+ " Lumo form to query inferior Clojure for a var's documentation."
573
573
:type 'string )
574
574
575
575
(defun inf-clojure-var-doc-form ()
@@ -580,24 +580,24 @@ If you are using REPL types, it will pickup the most approapriate
580
580
(lumo inf-clojure-var-doc-form-lumo)
581
581
(_ inf-clojure-var-doc-form)))
582
582
583
- (defcustom inf-clojure-var-source-command
583
+ (defcustom inf-clojure-var-source-form
584
584
" (clojure.repl/source %s)\n "
585
- " Command to query inferior Clojure for a var's source."
585
+ " Form to query inferior Clojure for a var's source."
586
586
:type 'string )
587
587
588
- (defcustom inf-clojure-arglist-command
588
+ (defcustom inf-clojure-arglist-form
589
589
" (try
590
590
(:arglists
591
591
(clojure.core/meta
592
592
(clojure.core/resolve
593
593
(clojure.core/read-string \" %s\" ))))
594
594
(catch Throwable t nil))\n "
595
- " Command to query inferior Clojure for a function's arglist."
595
+ " Form to query inferior Clojure for a function's arglist."
596
596
:type 'string )
597
597
598
598
(defcustom inf-clojure-completion-form
599
599
" (complete.core/completions \" %s\" )\n "
600
- " Command to query inferior Clojure for completion candidates."
600
+ " Form to query inferior Clojure for completion candidates."
601
601
:type 'string )
602
602
603
603
(defcustom inf-clojure-completion-form-lumo
@@ -613,30 +613,30 @@ If you are using REPL types, it will pickup the most approapriate
613
613
(lumo inf-clojure-completion-form-lumo)
614
614
(_ inf-clojure-completion-form)))
615
615
616
- (defcustom inf-clojure-ns-vars-command
616
+ (defcustom inf-clojure-ns-vars-form
617
617
" (clojure.repl/dir %s)\n "
618
- " Command to show the public vars in a namespace."
618
+ " Form to show the public vars in a namespace."
619
619
:type 'string )
620
620
621
- (defcustom inf-clojure-set-ns-command
621
+ (defcustom inf-clojure-set-ns-form
622
622
" (clojure.core/in-ns '%s)\n "
623
- " Command to set the namespace of the inferior Clojure process."
623
+ " Form to set the namespace of the inferior Clojure process."
624
624
:type 'string )
625
625
626
- (defcustom inf-clojure-apropos-command
626
+ (defcustom inf-clojure-apropos-form
627
627
" (doseq [var (sort (clojure.repl/apropos \" %s\" ))]
628
628
(println (str var)))\n "
629
- " Command to invoke apropos."
629
+ " Form to invoke apropos."
630
630
:type 'string )
631
631
632
- (defcustom inf-clojure-macroexpand-command
632
+ (defcustom inf-clojure-macroexpand-form
633
633
" (clojure.core/macroexpand '%s)\n "
634
- " Command to invoke macroexpand."
634
+ " Form to invoke macroexpand."
635
635
:type 'string )
636
636
637
- (defcustom inf-clojure-macroexpand-1-command
637
+ (defcustom inf-clojure-macroexpand-1-form
638
638
" (clojure.core/macroexpand-1 '%s)\n "
639
- " Command to invoke macroexpand-1."
639
+ " Form to invoke macroexpand-1."
640
640
:type 'string )
641
641
642
642
; ;; Ancillary functions
@@ -684,28 +684,28 @@ The value is nil if it can't find one."
684
684
; ;; ======================================================================
685
685
686
686
(defun inf-clojure-show-var-documentation (var )
687
- " Send a command to the inferior Clojure to give documentation for VAR.
687
+ " Send a form to the inferior Clojure to give documentation for VAR.
688
688
See function `inf-clojure-var-doc-form' ."
689
689
(interactive (inf-clojure-symprompt " Var doc" (inf-clojure-var-at-pt)))
690
690
(comint-proc-query (inf-clojure-proc) (format (inf-clojure-var-doc-form) var)))
691
691
692
692
(defun inf-clojure-show-var-source (var )
693
- " Send a command to the inferior Clojure to give source for VAR.
694
- See variable `inf-clojure-var-source-command ' ."
693
+ " Send a form to the inferior Clojure to give source for VAR.
694
+ See variable `inf-clojure-var-source-form ' ."
695
695
(interactive (inf-clojure-symprompt " Var source" (inf-clojure-var-at-pt)))
696
- (comint-proc-query (inf-clojure-proc) (format inf-clojure-var-source-command var)))
696
+ (comint-proc-query (inf-clojure-proc) (format inf-clojure-var-source-form var)))
697
697
698
698
(defun inf-clojure-arglist (fn )
699
699
" Send a query to the inferior Clojure for the arglist for function FN.
700
- See variable `inf-clojure-arglist-command ' ."
700
+ See variable `inf-clojure-arglist-form ' ."
701
701
(interactive (inf-clojure-symprompt " Arglist" (inf-clojure-fn-called-at-pt)))
702
702
(let* ((proc (inf-clojure-proc))
703
703
(comint-filt (process-filter proc))
704
704
(kept " " )
705
705
eldoc)
706
706
(set-process-filter proc (lambda (_proc string ) (setq kept (concat kept string))))
707
707
(unwind-protect
708
- (let ((eldoc-snippet (format inf-clojure-arglist-command fn)))
708
+ (let ((eldoc-snippet (format inf-clojure-arglist-form fn)))
709
709
(process-send-string proc eldoc-snippet)
710
710
(while (and (not (string-match inf-clojure-prompt kept))
711
711
(accept-process-output proc 2 )))
@@ -723,9 +723,9 @@ See variable `inf-clojure-arglist-command'."
723
723
724
724
(defun inf-clojure-show-ns-vars (ns )
725
725
" Send a query to the inferior Clojure for the public vars in NS.
726
- See variable `inf-clojure-ns-vars-command ' ."
726
+ See variable `inf-clojure-ns-vars-form ' ."
727
727
(interactive (inf-clojure-symprompt " Ns vars" (clojure-find-ns)))
728
- (comint-proc-query (inf-clojure-proc) (format inf-clojure-ns-vars-command ns)))
728
+ (comint-proc-query (inf-clojure-proc) (format inf-clojure-ns-vars-form ns)))
729
729
730
730
(defun inf-clojure-set-ns (ns )
731
731
" Set the ns of the inferior Clojure process to NS.
@@ -736,25 +736,25 @@ setting, unless `inf-clojure-prompt-on-set-ns` is nil."
736
736
(clojure-find-ns))))
737
737
(when (or (not ns) (equal ns " " ))
738
738
(user-error " No namespace selected" ))
739
- (comint-proc-query (inf-clojure-proc) (format inf-clojure-set-ns-command ns)))
739
+ (comint-proc-query (inf-clojure-proc) (format inf-clojure-set-ns-form ns)))
740
740
741
741
(defun inf-clojure-apropos (var )
742
- " Send a command to the inferior Clojure to give apropos for VAR.
743
- See variable `inf-clojure-apropos-command ' ."
742
+ " Send a form to the inferior Clojure to give apropos for VAR.
743
+ See variable `inf-clojure-apropos-form ' ."
744
744
(interactive (inf-clojure-symprompt " Var apropos" (inf-clojure-var-at-pt)))
745
- (comint-proc-query (inf-clojure-proc) (format inf-clojure-apropos-command var)))
745
+ (comint-proc-query (inf-clojure-proc) (format inf-clojure-apropos-form var)))
746
746
747
747
(defun inf-clojure-macroexpand (&optional macro-1 )
748
- " Send a command to the inferior Clojure to give apropos for VAR.
749
- See variable `inf-clojure-macroexpand-command ' .
750
- With a prefix arg MACRO-1 uses `inf-clojure-macroexpand-1-command ' ."
748
+ " Send a form to the inferior Clojure to give apropos for VAR.
749
+ See variable `inf-clojure-macroexpand-form ' .
750
+ With a prefix arg MACRO-1 uses `inf-clojure-macroexpand-1-form ' ."
751
751
(interactive " P" )
752
752
(let ((last-sexp (buffer-substring-no-properties (save-excursion (backward-sexp ) (point )) (point ))))
753
753
(inf-clojure--send-string
754
754
(inf-clojure-proc)
755
755
(format (if macro-1
756
- inf-clojure-macroexpand-1-command
757
- inf-clojure-macroexpand-command )
756
+ inf-clojure-macroexpand-1-form
757
+ inf-clojure-macroexpand-form )
758
758
last-sexp))))
759
759
760
760
0 commit comments