Skip to content

Commit 164ffa2

Browse files
committed
Replace a few occurrences of when + not with unless
1 parent 337352d commit 164ffa2

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cider-repl-history.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ text from the *cider-repl-history* buffer."
615615
#'copy-sequence
616616
#'substring-no-properties)
617617
cider-command-history)))
618-
(when (not cider-repl-history-display-duplicates)
618+
(unless cider-repl-history-display-duplicates
619619
;; display highest or lowest duplicate.
620620
;; if `cider-repl-history-display-duplicate-highest' is t,
621621
;; display highest (most recent) duplicate.

cider.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ string is quoted for passing as argument to an inferior shell."
348348
(defun cider-boot-dependencies (dependencies)
349349
"Return a list of boot artifact strings created from DEPENDENCIES."
350350
(concat (mapconcat #'cider--list-as-boot-artifact dependencies " ")
351-
(when (not (seq-empty-p dependencies)) " ")))
351+
(unless (seq-empty-p dependencies) " ")))
352352

353353
(defun cider-boot-middleware-task (params middlewares)
354354
"Create a command to add MIDDLEWARES with corresponding PARAMS."
@@ -366,7 +366,7 @@ PLUGINS and MIDDLEWARES. PARAMS and MIDDLEWARES are passed on to
366366
`cider-boot-middleware-task` before concatenating and DEPENDENCIES and PLUGINS
367367
are passed on to `cider-boot-dependencies`."
368368
(concat global-opts
369-
(when (not (seq-empty-p global-opts)) " ")
369+
(unless (seq-empty-p global-opts) " ")
370370
"-i \"(require 'cider.tasks)\" " ;; Note the white space at the end here
371371
(cider-boot-dependencies (append dependencies plugins))
372372
(cider-boot-middleware-task params middlewares)))
@@ -390,7 +390,7 @@ Does so by concatenating GLOBAL-OPTS, DEPENDENCIES, with DEPENDENCIES-EXCLUSIONS
390390
removed, LEIN-PLUGINS, and finally PARAMS."
391391
(concat
392392
global-opts
393-
(when (not (seq-empty-p global-opts)) " ")
393+
(unless (seq-empty-p global-opts) " ")
394394
(mapconcat #'identity
395395
(append (seq-map (lambda (dep)
396396
(let ((exclusions (cadr (assoc (car dep) dependencies-exclusions))))
@@ -447,7 +447,7 @@ dependencies."
447447
cider-jack-in-nrepl-middlewares))
448448
("gradle" (concat
449449
global-opts
450-
(when (not (seq-empty-p global-opts)) " ")
450+
(unless (seq-empty-p global-opts) " ")
451451
params))
452452
(_ (error "Unsupported project type `%s'" project-type))))
453453

nrepl-client.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ key-values depending on the connection type."
545545
If NO-ERROR is non-nil, show messages instead of throwing an error."
546546
(if (not (and host port))
547547
(unless no-error
548-
(when (not host)
548+
(unless host
549549
(error "[nREPL] Host not provided"))
550-
(when (not port)
550+
(unless port
551551
(error "[nREPL] Port not provided")))
552552
(message "[nREPL] Establishing direct connection to %s:%s ..." host port)
553553
(condition-case nil

test/cider-tests--no-auto.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ from the latter. Remaining content is compared for string equality."
8585
(let ((name (cond ((symbolp sym) (symbol-name sym))
8686
((listp sym) (symbol-name (cadr sym))))))
8787
(if name
88-
(when (not (cider-test-doc name))
88+
(unless (cider-test-doc name)
8989
(setq diffs (cons sym diffs)))
9090
(setq untested (cons sym untested)))))
9191
(when untested

0 commit comments

Comments
 (0)