Skip to content

Commit 2a6a7c0

Browse files
committed
Improve docstring clarity
- Fix grammar in inf-clojure-source-modes docstring - Use "mode line" (two words) per Emacs convention - Improve inf-clojure--get-feature and inf-clojure-get-feature docstrings: uppercase parameter names, reference the variable, document NO-ERROR behavior
1 parent 1524bc3 commit 2a6a7c0

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

inf-clojure.el

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,17 @@ processes, you might need to change `inf-clojure-buffer' to
191191
whichever process buffer you want to use.")
192192

193193
(defun inf-clojure--get-feature (repl-type feature no-error)
194-
"Get FEATURE for REPL-TYPE from repl-features.
195-
If no-error is truthy don't error if feature is not present."
194+
"Get FEATURE for REPL-TYPE from `inf-clojure-repl-features'.
195+
If NO-ERROR is non-nil, return nil instead of signaling an error
196+
when the feature is not present."
196197
(let ((feature-form (alist-get feature (alist-get repl-type inf-clojure-repl-features))))
197198
(cond (feature-form feature-form)
198199
(no-error nil)
199200
(t (error "%s not configured for %s" feature repl-type)))))
200201

201202
(defun inf-clojure-get-feature (proc feature &optional no-error)
202-
"Get FEATURE based on repl type for PROC."
203+
"Get FEATURE from `inf-clojure-repl-features' for PROC's REPL type.
204+
When NO-ERROR is non-nil, return nil instead of signaling an error."
203205
(let* ((repl-type (or (with-current-buffer (process-buffer proc)
204206
inf-clojure-repl-type)
205207
(error "REPL type is not known"))))
@@ -313,7 +315,7 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
313315
(defcustom inf-clojure-source-modes '(clojure-ts-mode clojure-mode)
314316
"Used to determine if a buffer contains Clojure source code.
315317
316-
Any buffer with one of these major modes, it's considered a Clojure
318+
If a buffer has one of these major modes, it's considered a Clojure
317319
source file by all `inf-clojure' commands."
318320
:type '(repeat symbol)
319321
:safe #'symbolp)
@@ -437,7 +439,7 @@ mode line entirely."
437439
"Var that allows disabling `eldoc-mode' in `inf-clojure'.
438440
439441
Set to nil to disable eldoc. Eldoc can be quite useful by
440-
displaying function signatures in the modeline, but can also
442+
displaying function signatures in the mode line, but can also
441443
cause multiple prompts to appear in the REPL and mess with *1,
442444
*2, etc."
443445
:type 'boolean

0 commit comments

Comments
 (0)