[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-clojure 26a2076 305/313: Replace if + not with unless
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-clojure 26a2076 305/313: Replace if + not with unless |
Date: |
Wed, 11 Aug 2021 10:00:38 -0400 (EDT) |
branch: elpa/inf-clojure
commit 26a2076277087859dda35452193e09b12c44b3ec
Author: Bozhidar Batsov <bozhidar@batsov.com>
Commit: Bozhidar Batsov <bozhidar@batsov.com>
Replace if + not with unless
---
inf-clojure.el | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/inf-clojure.el b/inf-clojure.el
index 141d633..88a9c86 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -753,22 +753,24 @@ process buffer for a list of commands.)"
(repl-buffer-name (if project-dir
(format "*inf-clojure %s*"
(inf-clojure--project-name project-dir))
"*inf-clojure*")))
- (if (not (comint-check-proc repl-buffer-name))
- ;; run the new process in the project's root when in a project
folder
- (let ((default-directory (or project-dir default-directory))
- (cmdlist (if (consp cmd)
- (list cmd)
- (split-string cmd)))
- (repl-type (or (unless prefix-arg
- inf-clojure-custom-repl-type)
- (car (rassoc cmd inf-clojure-startup-forms))
- (inf-clojure--prompt-repl-type))))
- (message "Starting Clojure REPL via `%s'..." cmd)
- (with-current-buffer (apply #'make-comint
- "inf-clojure" (car cmdlist) nil
(cdr cmdlist))
- (inf-clojure-mode)
- (setq-local inf-clojure-repl-type repl-type)
- (hack-dir-local-variables-non-file-buffer))))
+ ;; Create a new comint buffer if needed
+ (unless (comint-check-proc repl-buffer-name)
+ ;; run the new process in the project's root when in a project folder
+ (let ((default-directory (or project-dir default-directory))
+ (cmdlist (if (consp cmd)
+ (list cmd)
+ (split-string cmd)))
+ (repl-type (or (unless prefix-arg
+ inf-clojure-custom-repl-type)
+ (car (rassoc cmd inf-clojure-startup-forms))
+ (inf-clojure--prompt-repl-type))))
+ (message "Starting Clojure REPL via `%s'..." cmd)
+ (with-current-buffer (apply #'make-comint
+ "inf-clojure" (car cmdlist) nil (cdr
cmdlist))
+ (inf-clojure-mode)
+ (setq-local inf-clojure-repl-type repl-type)
+ (hack-dir-local-variables-non-file-buffer))))
+ ;; update the default comint buffer and switch to it
(setq inf-clojure-buffer (get-buffer repl-buffer-name))
(if inf-clojure-repl-use-same-window
(pop-to-buffer-same-window repl-buffer-name)
- [nongnu] elpa/inf-clojure b88de63 260/313: Tweak a docstring, (continued)
- [nongnu] elpa/inf-clojure b88de63 260/313: Tweak a docstring, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure e144b33 276/313: Improve the Makefile commands, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 917ee77 268/313: Improve the README a bit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 91f4121 280/313: Bump the copyright years, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 8eaf885 275/313: [Fix #152] Sanitize should only remove whitespace at the end of a command, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure ec4a85e 285/313: Bump copyright years, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 2046b12 298/313: Make inf-clojure-repl-p a bit more flexible, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure e1d7007 297/313: Touch up the previous commit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 9841b38 303/313: Remove some redundant code, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 3d31bee 313/313: Update my email, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 26a2076 305/313: Replace if + not with unless,
ELPA Syncer <=
- [nongnu] elpa/inf-clojure be3e2e7 195/313: Introduce inf-clojure-reload, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 953feb0 198/313: Improve command sanitation code, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 7ed4f44 203/313: Remove emacs 24.3 and add 26 to Travis tests, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 010d859 219/313: Fix spelling issues (#156), ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 7bf6f3d 209/313: README: Improve formatting., ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 575538e 230/313: Create FUNDING.yml, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure bd06d4f 229/313: A few updates to links and formatting in README, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 49390d9 231/313: Bump the copyright years, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure 799d937 250/313: Improve the README a bit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure c30f90e 265/313: Ensure comint-truncate-buffer call is from the repl buffer, ELPA Syncer, 2021/08/11