[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider bb1c477c44: cider--sesman-friendly-session-p: check
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider bb1c477c44: cider--sesman-friendly-session-p: check for `ns-list` op availability |
Date: |
Fri, 29 Sep 2023 01:00:06 -0400 (EDT) |
branch: elpa/cider
commit bb1c477c44afaf4ef1b907bd069d117f63d498e7
Author: vemv <vemv@users.noreply.github.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
cider--sesman-friendly-session-p: check for `ns-list` op availability
This speeds up `(cider-current-repl)` performance in non-linked buffers
from to 0.01s to 0.00098800s.
Because `(cider-current-repl)` can be repeatedly invoked by e.g.
`electric-indent-mode`, it makes a difference.
Fixes https://github.com/clojure-emacs/clojure-mode/issues/665
---
cider-repl.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/cider-repl.el b/cider-repl.el
index b2f637b1ee..077f6c9660 100644
--- a/cider-repl.el
+++ b/cider-repl.el
@@ -1778,11 +1778,12 @@ The checking is done as follows:
(cider-classpath-entries))))
(process-put proc :cached-classpath cp)
cp)))
- (ns-list (or (process-get proc :all-namespaces)
- (let ((ns-list (with-current-buffer repl
- (cider-sync-request:ns-list))))
- (process-put proc :all-namespaces ns-list)
- ns-list)))
+ (ns-list (when (nrepl-op-supported-p "ns-list" repl)
+ (or (process-get proc :all-namespaces)
+ (let ((ns-list (with-current-buffer repl
+
(cider-sync-request:ns-list))))
+ (process-put proc :all-namespaces ns-list)
+ ns-list))))
(classpath-roots (or (process-get proc
:cached-classpath-roots)
(let ((cp (thread-last classpath
(seq-filter
(lambda (path) (not (string-match-p "\\.jar$" path))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/cider bb1c477c44: cider--sesman-friendly-session-p: check for `ns-list` op availability,
ELPA Syncer <=