Skip to content

Commit b06a9b4

Browse files
committed
Rename eval spinner defcustoms to be generic
The spinner settings are now used for both eval and test operations, so the eval-specific names no longer make sense. - cider-eval-spinner-type -> cider-spinner-type - cider-show-eval-spinner -> cider-show-spinner - cider-eval-spinner-delay -> cider-spinner-delay Old names kept as obsolete aliases.
1 parent 75097b1 commit b06a9b4

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

lisp/cider-client.el

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,28 @@
4040
(require 'nrepl-client)
4141

4242

43-
;;; Eval spinner
44-
(defcustom cider-eval-spinner-type 'progress-bar
45-
"Appearance of the evaluation spinner.
43+
;;; Spinner
44+
(define-obsolete-variable-alias 'cider-eval-spinner-type 'cider-spinner-type "1.18.0")
45+
(define-obsolete-variable-alias 'cider-show-eval-spinner 'cider-show-spinner "1.18.0")
46+
(define-obsolete-variable-alias 'cider-eval-spinner-delay 'cider-spinner-delay "1.18.0")
47+
48+
(defcustom cider-spinner-type 'progress-bar
49+
"Appearance of the spinner.
4650
4751
Value is a symbol. The possible values are the symbols in the
4852
`spinner-types' variable."
4953
:type 'symbol
5054
:group 'cider
5155
:package-version '(cider . "0.10.0"))
5256

53-
(defcustom cider-show-eval-spinner t
54-
"When true, show the evaluation spinner in the mode line."
57+
(defcustom cider-show-spinner t
58+
"When true, show a spinner in the mode line for long-running operations."
5559
:type 'boolean
5660
:group 'cider
5761
:package-version '(cider . "0.10.0"))
5862

59-
(defcustom cider-eval-spinner-delay 1
60-
"Amount of time, in seconds, after which the evaluation spinner will be shown."
63+
(defcustom cider-spinner-delay 1
64+
"Amount of time, in seconds, after which the spinner will be shown."
6165
:type 'integer
6266
:group 'cider
6367
:package-version '(cider . "0.10.0"))
@@ -83,12 +87,12 @@ resulting value are used to compute completions."
8387
:package-version '(cider . "1.2.0"))
8488

8589
(defun cider-spinner-start (buffer)
86-
"Start the evaluation spinner in BUFFER.
87-
Do nothing if `cider-show-eval-spinner' is nil."
88-
(when cider-show-eval-spinner
90+
"Start a spinner in BUFFER.
91+
Do nothing if `cider-show-spinner' is nil."
92+
(when cider-show-spinner
8993
(with-current-buffer buffer
90-
(spinner-start cider-eval-spinner-type nil
91-
cider-eval-spinner-delay))))
94+
(spinner-start cider-spinner-type nil
95+
cider-spinner-delay))))
9296

9397
(defun cider-eval-spinner (eval-buffer response)
9498
"Handle RESPONSE stopping the spinner.
@@ -227,7 +231,7 @@ buffer, defaults to (cider-current-repl)."
227231
(run-hooks 'cider-before-eval-hook)
228232
(nrepl-request:eval input
229233
(lambda (response)
230-
(when cider-show-eval-spinner
234+
(when cider-show-spinner
231235
(cider-eval-spinner connection response))
232236
(when (and (buffer-live-p eval-buffer)
233237
(member "done" (nrepl-dict-get response "status")))

0 commit comments

Comments
 (0)