branch: elpa/cider
commit 9db76ba4dc2a072f1cec4e2be30e78921a30694e
Author: Kato Muso <m...@katomuso.io>
Commit: Bozhidar Batsov <bozhi...@batsov.dev>

    Add customizable variable cider-cheatsheet-auto-select-buffer
---
 cider-cheatsheet.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el
index 8a0d8ade94..2de99aa1d3 100644
--- a/cider-cheatsheet.el
+++ b/cider-cheatsheet.el
@@ -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"
@@ -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)

Reply via email to