Skip to content

Commit 9db76ba

Browse files
katomusobbatsov
authored andcommitted
Add customizable variable cider-cheatsheet-auto-select-buffer
1 parent c430dc0 commit 9db76ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cider-cheatsheet.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141

4242
(defconst cider-cheatsheet-buffer "*cider-cheatsheet*")
4343

44+
(defcustom cider-cheatsheet-auto-select-buffer t
45+
"Whether to auto-select the cheatsheet popup buffer."
46+
:type 'boolean
47+
:package-version '(cider . "1.15.0"))
48+
4449
(defconst cider-cheatsheet-hierarchy
4550
'(("Documentation"
4651
("REPL"
@@ -613,7 +618,8 @@ With a prefix argument FLAT, represent each candidate as a full path to var."
613618
(defun cider-cheatsheet ()
614619
"Display cheatsheet in a popup buffer."
615620
(interactive)
616-
(with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer)
621+
(with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer
622+
cider-cheatsheet-auto-select-buffer)
617623
(read-only-mode -1)
618624
(insert (cider-cheatsheet--buffer-contents))
619625
(read-only-mode 1)

0 commit comments

Comments
 (0)