From aceab734bc675753484a91b14bdb2aa1b5f120f5 Mon Sep 17 00:00:00 2001 From: Nahuel Greco Date: Sun, 21 May 2017 17:33:01 -0300 Subject: [PATCH] Added cider-doc-auto-select-buffer custom variable Added cider-doc-auto-select-buffer custom variable to control if the documentation viewer popup will be autoselected after opening. --- CHANGELOG.md | 1 + cider-doc.el | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 587ccfa79..d9f59feb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * [#1726](https://github.com/clojure-emacs/cider/issues/1726): Order keys in printed nrepl message objects. * [#1832](https://github.com/clojure-emacs/cider/issues/1832): Add new customization variable `cider-eldoc-display-context-dependent-info` to control showing eldoc info for datomic query input parameters. * Make it possible to disable auto-evaluation of changed ns forms via the defcustom `cider-auto-track-ns-form-changes`. +* [#1995](https://github.com/clojure-emacs/cider/pull/1995): Add new customization variable `cider-doc-auto-select-buffer` to control cider-doc popup buffer auto selection ### Changes diff --git a/cider-doc.el b/cider-doc.el index bf22bf974..896f0fe3e 100644 --- a/cider-doc.el +++ b/cider-doc.el @@ -96,6 +96,10 @@ :group 'cider-docview-mode :package-version '(cider . "0.7.0")) +(defcustom cider-doc-auto-select-buffer t + "Autoselect the documentation viewer after popup." + :type 'boolean + :group 'cider-doc) ;; Faces @@ -263,7 +267,7 @@ opposite of what that option dictates." (defun cider-doc-lookup (symbol) "Look up documentation for SYMBOL." (if-let ((buffer (cider-create-doc-buffer symbol))) - (cider-popup-buffer-display buffer t) + (cider-popup-buffer-display buffer cider-doc-auto-select-buffer) (user-error "Symbol %s not resolved" symbol))) (defun cider-doc (&optional arg)