@@ -191,7 +191,7 @@ Given a REPL-TYPE ('clojure, 'lumo, ...) and a FEATURE ('doc,
191
191
192
192
(defun inf-clojure-proc (&optional no-error )
193
193
" Return the current inferior Clojure process.
194
- When NO-ERROR is non-nil, don't throw an error when no connection
194
+ When NO-ERROR is non-nil, don't throw an error when no process
195
195
has been found. See also variable `inf-clojure-buffer' ."
196
196
(or (get-buffer-process (if (derived-mode-p 'inf-clojure-mode )
197
197
(current-buffer )
@@ -200,14 +200,14 @@ has been found. See also variable `inf-clojure-buffer'."
200
200
(error " No Clojure subprocess; see variable `inf-clojure-buffer' " ))))
201
201
202
202
(defun inf-clojure-repl-p ()
203
- " Indicates if current buffer is an inf-clojure repl .
203
+ " Indicates if the current buffer is an inf-clojure REPL .
204
204
Checks the mode and that there is a live process."
205
205
(and (derived-mode-p 'inf-clojure-mode )
206
206
(get-buffer-process (current-buffer ))
207
207
(process-live-p (get-buffer-process (current-buffer )))))
208
208
209
- (defun inf-clojure-repls-list ()
210
- " Return a list of all known inf-clojure repls ."
209
+ (defun inf-clojure-repls ()
210
+ " Return a list of all inf-clojure REPL buffers ."
211
211
(let (repl-buffers)
212
212
(dolist (b (buffer-list ))
213
213
(with-current-buffer b
@@ -216,18 +216,18 @@ Checks the mode and that there is a live process."
216
216
repl-buffers))
217
217
218
218
(defun inf-clojure-set-repl (always-ask )
219
- " Set an inf clojure buffer as the active repl .
220
- If in a repl already, use that unless a prefix is used (or
219
+ " Set an inf- clojure buffer as the active (default) REPL .
220
+ If in a REPL buffer already, use that unless a prefix is used (or
221
221
ALWAYS-ASK). Otherwise get a list of all active inf-clojure
222
- repls and offer a choice. Recommended to rename buffers as they
223
- are created with `rename-buffer` ."
222
+ REPLS and offer a choice. It's recommended to rename REPL
223
+ buffers after they are created with `rename-buffer' ."
224
224
(interactive " P" )
225
225
(if (and (not always-ask)
226
226
(inf-clojure-repl-p))
227
227
(setq inf-clojure-buffer (current-buffer ))
228
- (let ((repl-buffers (inf-clojure-repls-list )))
228
+ (let ((repl-buffers (inf-clojure-repls)))
229
229
(if (> (length repl-buffers) 0 )
230
- (when-let ((repl-buffer (completing-read " Use for repl : " repl-buffers nil t )))
230
+ (when-let ((repl-buffer (completing-read " Select default REPL : " repl-buffers nil t )))
231
231
(setq inf-clojure-buffer (get-buffer repl-buffer)))
232
232
(user-error " No buffers have an inf-clojure process" )))))
233
233
@@ -275,13 +275,13 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
275
275
:type 'regexp )
276
276
277
277
(defun inf-clojure--modeline-info ()
278
- " Return modeline info.
279
- Either \" not connected \" or \" repl-type: buffer-name\" "
278
+ " Return modeline info for `inf-clojure-minor-mode' .
279
+ Either \" no process \" or \" buffer-name(repl-type) \" "
280
280
(if (and (bufferp inf-clojure-buffer)
281
281
(buffer-live-p inf-clojure-buffer))
282
282
(with-current-buffer inf-clojure-buffer
283
- (format " %s : %s " inf-clojure-repl-type (buffer-name (current-buffer ))))
284
- " not connected " ))
283
+ (format " %s ( %s ) " (buffer-name (current-buffer )) inf-clojure-repl-type ))
284
+ " no process " ))
285
285
286
286
(defvar inf-clojure-mode-map
287
287
(let ((map (copy-keymap comint-mode-map)))
@@ -378,7 +378,7 @@ about mode line templates.
378
378
379
379
Customize this variable to change how inf-clojure-minor-mode
380
380
displays its status in the mode line. The default value displays
381
- the current connection . Set this variable to nil to disable the
381
+ the current REPL . Set this variable to nil to disable the
382
382
mode line entirely."
383
383
:type 'sexp
384
384
:risky t )
0 commit comments