Skip to content

Commit

Permalink
Add customizable variable cider-cheatsheet-auto-select-buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
katomuso authored and bbatsov committed Jun 3, 2024
1 parent c430dc0 commit 9db76ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cider-cheatsheet.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@

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

(defcustom cider-cheatsheet-auto-select-buffer t
"Whether to auto-select the cheatsheet popup buffer."
:type 'boolean
:package-version '(cider . "1.15.0"))

(defconst cider-cheatsheet-hierarchy
'(("Documentation"
("REPL"
Expand Down Expand Up @@ -613,7 +618,8 @@ With a prefix argument FLAT, represent each candidate as a full path to var."
(defun cider-cheatsheet ()
"Display cheatsheet in a popup buffer."
(interactive)
(with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer)
(with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer
cider-cheatsheet-auto-select-buffer)
(read-only-mode -1)
(insert (cider-cheatsheet--buffer-contents))
(read-only-mode 1)
Expand Down

0 comments on commit 9db76ba

Please sign in to comment.