@@ -392,7 +392,7 @@ This should usually be a combination of `inf-clojure-prompt' and
392
392
:package-version '(inf-clojure . " 2.0.0" ))
393
393
394
394
(defvar inf-clojure-buffer nil
395
- " The current inf-clojure process buffer.
395
+ " The current ` inf-clojure' process buffer.
396
396
397
397
MULTIPLE PROCESS SUPPORT
398
398
===========================================================================
@@ -558,9 +558,10 @@ Fallback to `default-directory.' if not within a project."
558
558
" Run an inferior Clojure process, input and output via buffer `*inf-clojure*' .
559
559
If there is a process already running in `*inf-clojure*' , just switch
560
560
to that buffer.
561
- With argument, allows you to edit the command line (default is value
562
- of `inf-clojure-*-cmd' ). Runs the hooks from
563
- `inf-clojure-mode-hook' (after the `comint-mode-hook' is run).
561
+ With argument, allows you to edit the CMD used to launch
562
+ it (default is value of `inf-clojure-*-cmd' ). Runs the hooks
563
+ from `inf-clojure-mode-hook' (after the `comint-mode-hook' is
564
+ run).
564
565
\( Type \\ [describe-mode] in the process buffer for a list of commands.)"
565
566
(interactive (list (if current-prefix-arg
566
567
(read-string " Run Clojure: " (inf-clojure-cmd (inf-clojure-project-type)))
@@ -680,9 +681,11 @@ Used by this command to determine defaults."
680
681
:type '(repeat symbol))
681
682
682
683
(defun inf-clojure-load-file (&optional switch-to-repl file-name )
683
- " Load a Clojure file FILE-NAME into the inferior Clojure process.
684
+ " Load a Clojure file into the inferior Clojure process.
684
685
685
- The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the file is loaded or not."
686
+ The prefix argument SWITCH-TO-REPL controls whether to switch to
687
+ REPL after the file is loaded or not. If the argument FILE-NAME
688
+ is present it will be used instead of the current file."
686
689
(interactive " P" )
687
690
(let ((file-name (or file-name
688
691
(car (comint-get-source " Load Clojure file: " inf-clojure-prev-l/c-dir/file
@@ -1004,8 +1007,11 @@ If you are using REPL types, it will pickup the most approapriate
1004
1007
; ;; Ancillary functions
1005
1008
; ;; ===================
1006
1009
1007
- ; ;; Reads a string from the user.
1008
1010
(defun inf-clojure-symprompt (prompt default )
1011
+ " Read a string from the user.
1012
+
1013
+ It allows to specify a PROMPT string and a DEFAULT string to
1014
+ display."
1009
1015
(list (let* ((prompt (if default
1010
1016
(format " %s (default %s ): " prompt default )
1011
1017
(concat prompt " : " )))
@@ -1222,16 +1228,16 @@ PROMPT-FOR-NS, it prompts for a namespace name."
1222
1228
(user-error " No namespace selected" ))
1223
1229
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-set-ns-form) ns))))
1224
1230
1225
- (defun inf-clojure-apropos (var )
1226
- " Send a form to the inferior Clojure to give apropos for VAR .
1231
+ (defun inf-clojure-apropos ()
1232
+ " Send an expression to the inferior Clojure for apropos .
1227
1233
See variable `inf-clojure-apropos-form' ."
1228
1234
(interactive (inf-clojure-symprompt " Var apropos" (inf-clojure-symbol-at-point)))
1229
1235
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-apropos-form) var)))
1230
1236
1231
1237
(defun inf-clojure-macroexpand (&optional macro-1 )
1232
- " Send a form to the inferior Clojure to give apropos for VAR .
1238
+ " Send a form to the inferior Clojure for macro expansion .
1233
1239
See variable `inf-clojure-macroexpand-form' .
1234
- With a prefix arg MACRO-1 uses `inf-clojure-macroexpand-1-form' ."
1240
+ With a prefix arg MACRO-1 uses function `inf-clojure-macroexpand-1-form' ."
1235
1241
(interactive " P" )
1236
1242
(let ((last-sexp (buffer-substring-no-properties (save-excursion (backward-sexp ) (point )) (point ))))
1237
1243
(inf-clojure--send-string
@@ -1418,9 +1424,9 @@ Return the number of nested sexp the point was over or after."
1418
1424
(message " inf-clojure (version %s ) " inf-clojure-version))
1419
1425
1420
1426
(defun inf-clojure-select-target-repl ()
1421
- " Find or select an inf-clojure buffer to operate on.
1427
+ " Find or select an ‘ inf-clojure’ buffer to operate on.
1422
1428
1423
- Useful for commands that can invoked outside of an inf-clojure buffer
1429
+ Useful for commands that can invoked outside of an ‘ inf-clojure’ buffer
1424
1430
\\ (e.g. from a Clojure buffer\\ )."
1425
1431
; ; if we're in a inf-clojure buffer we simply return in
1426
1432
(if (eq major-mode 'inf-clojure-mode )
@@ -1461,7 +1467,7 @@ to suppress the usage of the target buffer discovery logic."
1461
1467
(rename-buffer target-buffer-name)))
1462
1468
1463
1469
(defun inf-clojure--response-match-p (form match-p proc )
1464
- " Return MATCH-P on the result of sending FORM to PROC.
1470
+ " Send FORM and apply MATCH-P on the result of sending it to PROC.
1465
1471
Note that this function will add a \n to the end of the string
1466
1472
for evaluation, therefore FORM should not include it."
1467
1473
(funcall match-p (inf-clojure--process-response form proc nil )))
0 commit comments