emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode 5aa4010 082/496: Replace if not with unless


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 5aa4010 082/496: Replace if not with unless
Date: Sun, 29 Aug 2021 11:33:12 -0400 (EDT)

branch: elpa/swift-mode
commit 5aa4010a66e030a52430bbe8bede42576407ad08
Author: Bozhidar Batsov <bozhidar@batsov.com>
Commit: Bozhidar Batsov <bozhidar@batsov.com>

    Replace if not with unless
---
 swift-mode.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index fbeb962..0211400 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -346,15 +346,15 @@ is run).
   (interactive (list (if current-prefix-arg
                          (read-string "Run swift-repl: " swift-repl-executable)
                        swift-repl-executable)))
-  (if (not (comint-check-proc "*swift-repl*"))
-      (save-excursion (let ((cmdlist (split-string cmd)))
-                        (set-buffer (apply 'make-comint "swift-repl" (car 
cmdlist)
-                                           nil (cdr cmdlist)))
-                        (swift-repl-mode))))
+  (unless (comint-check-proc "*swift-repl*")
+    (save-excursion (let ((cmdlist (split-string cmd)))
+                      (set-buffer (apply 'make-comint "swift-repl" (car 
cmdlist)
+                                         nil (cdr cmdlist)))
+                      (swift-repl-mode))))
   (setq swift-repl-executable cmd)
   (setq swift-repl-buffer "*swift-repl*")
-  (if (not dont-switch-p)
-      (pop-to-buffer "*swift-repl*")))
+  (unless dont-switch-p
+    (pop-to-buffer "*swift-repl*")))
 
 (defun swift-mode-send-region (start end)
   "Send the current region to the inferior swift process.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]