[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-clojure e1d7007 297/313: Touch up the previous commit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-clojure e1d7007 297/313: Touch up the previous commit |
Date: |
Wed, 11 Aug 2021 10:00:37 -0400 (EDT) |
branch: elpa/inf-clojure
commit e1d7007f9a5afa7ec6dd81858ea18044eb0ff555
Author: Bozhidar Batsov <bozhidar@batsov.com>
Commit: Bozhidar Batsov <bozhidar@batsov.com>
Touch up the previous commit
---
README.md | 12 +++++++-----
inf-clojure.el | 30 +++++++++++++++---------------
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index 6bf9fca..75aa0ec 100644
--- a/README.md
+++ b/README.md
@@ -317,12 +317,14 @@ processes, you might need to change `inf-clojure-buffer`
to
whichever process buffer you want to use.
You can use the helpful function `inf-clojure-set-repl`. If called in
-an inf-clojure repl buffer, it will assign that buffer as the current
-connection (`(setq inf-clojure-buffer (current-buffer)`). If you are
-not in an inf-clojure repl buffer, it will offer a choice of
-acceptable buffers to set as the repl buffer. If called with a prefix,
+an `inf-clojure` REPL buffer, it will assign that buffer as the current
+REPL (`(setq inf-clojure-buffer (current-buffer)`). If you are
+not in an `inf-clojure` REPL buffer, it will offer a choice of
+acceptable buffers to set as the REPL buffer. If called with a prefix,
it will always give the list even if you are currently in an
-acceptable repl buffer. Renaming buffers will greatly improve the
+acceptable REPL buffer.
+
+**Tip:** Renaming buffers will greatly improve the
functionality of this list; the list "project-1: clojure repl",
"project-2: cljs repl" is far more understandable than "inf-clojure",
"inf-clojure<2>".
diff --git a/inf-clojure.el b/inf-clojure.el
index 062f925..92812b7 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -191,7 +191,7 @@ Given a REPL-TYPE ('clojure, 'lumo, ...) and a FEATURE
('doc,
(defun inf-clojure-proc (&optional no-error)
"Return the current inferior Clojure process.
-When NO-ERROR is non-nil, don't throw an error when no connection
+When NO-ERROR is non-nil, don't throw an error when no process
has been found. See also variable `inf-clojure-buffer'."
(or (get-buffer-process (if (derived-mode-p 'inf-clojure-mode)
(current-buffer)
@@ -200,14 +200,14 @@ has been found. See also variable `inf-clojure-buffer'."
(error "No Clojure subprocess; see variable `inf-clojure-buffer'"))))
(defun inf-clojure-repl-p ()
- "Indicates if current buffer is an inf-clojure repl.
+ "Indicates if the current buffer is an inf-clojure REPL.
Checks the mode and that there is a live process."
(and (derived-mode-p 'inf-clojure-mode)
(get-buffer-process (current-buffer))
(process-live-p (get-buffer-process (current-buffer)))))
-(defun inf-clojure-repls-list ()
- "Return a list of all known inf-clojure repls."
+(defun inf-clojure-repls ()
+ "Return a list of all inf-clojure REPL buffers."
(let (repl-buffers)
(dolist (b (buffer-list))
(with-current-buffer b
@@ -216,18 +216,18 @@ Checks the mode and that there is a live process."
repl-buffers))
(defun inf-clojure-set-repl (always-ask)
- "Set an inf clojure buffer as the active repl.
-If in a repl already, use that unless a prefix is used (or
+ "Set an inf-clojure buffer as the active (default) REPL.
+If in a REPL buffer already, use that unless a prefix is used (or
ALWAYS-ASK). Otherwise get a list of all active inf-clojure
-repls and offer a choice. Recommended to rename buffers as they
-are created with `rename-buffer`."
+REPLS and offer a choice. It's recommended to rename REPL
+buffers after they are created with `rename-buffer'."
(interactive "P")
(if (and (not always-ask)
(inf-clojure-repl-p))
(setq inf-clojure-buffer (current-buffer))
- (let ((repl-buffers (inf-clojure-repls-list)))
+ (let ((repl-buffers (inf-clojure-repls)))
(if (> (length repl-buffers) 0)
- (when-let ((repl-buffer (completing-read "Use for repl: "
repl-buffers nil t)))
+ (when-let ((repl-buffer (completing-read "Select default REPL: "
repl-buffers nil t)))
(setq inf-clojure-buffer (get-buffer repl-buffer)))
(user-error "No buffers have an inf-clojure process")))))
@@ -275,13 +275,13 @@ mode. Default is whitespace followed by 0 or 1
single-letter colon-keyword
:type 'regexp)
(defun inf-clojure--modeline-info ()
- "Return modeline info.
-Either \"not connected\" or \"repl-type: buffer-name\""
+ "Return modeline info for `inf-clojure-minor-mode'.
+Either \"no process\" or \"buffer-name(repl-type)\""
(if (and (bufferp inf-clojure-buffer)
(buffer-live-p inf-clojure-buffer))
(with-current-buffer inf-clojure-buffer
- (format "%s: %s" inf-clojure-repl-type (buffer-name (current-buffer))))
- "not connected"))
+ (format "%s(%s)" (buffer-name (current-buffer)) inf-clojure-repl-type))
+ "no process"))
(defvar inf-clojure-mode-map
(let ((map (copy-keymap comint-mode-map)))
@@ -378,7 +378,7 @@ about mode line templates.
Customize this variable to change how inf-clojure-minor-mode
displays its status in the mode line. The default value displays
-the current connection. Set this variable to nil to disable the
+the current REPL. Set this variable to nil to disable the
mode line entirely."
:type 'sexp
:risky t)
- [nongnu] elpa/inf-clojure 58150d7 256/313: Improve some wording in the README, (continued)
- [nongnu] elpa/inf-clojure 58150d7 256/313: Improve some wording in the README, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure f63c609 252/313: Fix a typo, ELPA Syncer, 2021/08/11
- [nongnu] elpa/inf-clojure b5e915c 204/313: Travis test like in cider, ELPA Syncer, 2021/08/11
- [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 <=
- [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, 2021/08/11
- [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