Skip to content

Commit f4478ad

Browse files
arichiardibbatsov
authored andcommitted
Fix and reword docstring
I went through a checkdoc session and fixed what was easiest to fix. Not everything, but it is a good start.
1 parent 247ca70 commit f4478ad

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

inf-clojure.el

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ This should usually be a combination of `inf-clojure-prompt' and
392392
:package-version '(inf-clojure . "2.0.0"))
393393

394394
(defvar inf-clojure-buffer nil
395-
"The current inf-clojure process buffer.
395+
"The current `inf-clojure' process buffer.
396396
397397
MULTIPLE PROCESS SUPPORT
398398
===========================================================================
@@ -558,9 +558,10 @@ Fallback to `default-directory.' if not within a project."
558558
"Run an inferior Clojure process, input and output via buffer `*inf-clojure*'.
559559
If there is a process already running in `*inf-clojure*', just switch
560560
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).
564565
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
565566
(interactive (list (if current-prefix-arg
566567
(read-string "Run Clojure: " (inf-clojure-cmd (inf-clojure-project-type)))
@@ -680,9 +681,11 @@ Used by this command to determine defaults."
680681
:type '(repeat symbol))
681682

682683
(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.
684685
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."
686689
(interactive "P")
687690
(let ((file-name (or file-name
688691
(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
10041007
;;; Ancillary functions
10051008
;;; ===================
10061009

1007-
;;; Reads a string from the user.
10081010
(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."
10091015
(list (let* ((prompt (if default
10101016
(format "%s (default %s): " prompt default)
10111017
(concat prompt ": ")))
@@ -1222,16 +1228,16 @@ PROMPT-FOR-NS, it prompts for a namespace name."
12221228
(user-error "No namespace selected"))
12231229
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-set-ns-form) ns))))
12241230

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.
12271233
See variable `inf-clojure-apropos-form'."
12281234
(interactive (inf-clojure-symprompt "Var apropos" (inf-clojure-symbol-at-point)))
12291235
(inf-clojure--send-string (inf-clojure-proc) (format (inf-clojure-apropos-form) var)))
12301236

12311237
(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.
12331239
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'."
12351241
(interactive "P")
12361242
(let ((last-sexp (buffer-substring-no-properties (save-excursion (backward-sexp) (point)) (point))))
12371243
(inf-clojure--send-string
@@ -1418,9 +1424,9 @@ Return the number of nested sexp the point was over or after."
14181424
(message "inf-clojure (version %s)" inf-clojure-version))
14191425

14201426
(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.
14221428
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
14241430
\\(e.g. from a Clojure buffer\\)."
14251431
;; if we're in a inf-clojure buffer we simply return in
14261432
(if (eq major-mode 'inf-clojure-mode)
@@ -1461,7 +1467,7 @@ to suppress the usage of the target buffer discovery logic."
14611467
(rename-buffer target-buffer-name)))
14621468

14631469
(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.
14651471
Note that this function will add a \n to the end of the string
14661472
for evaluation, therefore FORM should not include it."
14671473
(funcall match-p (inf-clojure--process-response form proc nil)))

0 commit comments

Comments
 (0)