Skip to content

Commit 595e8a7

Browse files
vspinubbatsov
authored andcommitted
[Fix #2045] *cider-scratch* is no longer an ancillary buffer
1 parent cb87da4 commit 595e8a7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### Changes
88

9+
* [#2045](https://github.com/clojure-emacs/cider/issues/2045) `*cider-scratch*` buffers are no longer automatically killed on connection quit.
10+
911
### Bugs Fixed
1012

1113
* [#2004](https://github.com/clojure-emacs/cider/issues/2004), [#2039](https://github.com/clojure-emacs/cider/issues/2039), [cider-nrepl#420](https://github.com/clojure-emacs/cider-nrepl/issues/420): Fix namespace issues in instrumentation and debugging commands.

cider-interaction.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,15 +1775,18 @@ START and END represent the region's boundaries."
17751775
(when conn
17761776
(cider--close-connection-buffer conn)))
17771777

1778+
(defvar cider-scratch-buffer-name)
17781779
(defun cider-quit (&optional quit-all)
17791780
"Quit the currently active CIDER connection.
1780-
17811781
With a prefix argument QUIT-ALL the command will kill all connections
17821782
and all ancillary CIDER buffers."
17831783
(interactive "P")
17841784
(cider-ensure-connected)
17851785
(if (and quit-all (y-or-n-p "Are you sure you want to quit all CIDER connections? "))
17861786
(progn
1787+
(when-let ((scratch (get-buffer cider-scratch-buffer-name)))
1788+
(when (y-or-n-p (format "Kill %s? buffer" cider-scratch-buffer-name))
1789+
(kill-buffer cider-scratch-buffer-name)))
17871790
(dolist (connection cider-connections)
17881791
(cider--quit-connection connection))
17891792
(message "All active nREPL connections were closed"))

cider-scratch.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
map))
5353

5454
(defconst cider-scratch-buffer-name "*cider-scratch*")
55-
(add-to-list 'cider-ancillary-buffers cider-scratch-buffer-name)
5655

5756
;;;###autoload
5857
(defun cider-scratch ()

0 commit comments

Comments
 (0)