branch: master
commit 48a4c839fe658b0d2af7349853e84e0d4767fdf3
Author: Damien Cassou <[email protected]>
Commit: Damien Cassou <[email protected]>

    Make it possible to configure counsel-describe-function
    
    This is useful for users of helpful:
    https://github.com/Wilfred/helpful.
---
 counsel.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 1160651..3d799c2 100644
--- a/counsel.el
+++ b/counsel.el
@@ -535,6 +535,11 @@ Variables declared using `defcustom' are highlighted 
according to
  '(("I" counsel-info-lookup-symbol "info")
    ("d" counsel--find-symbol "definition")))
 
+(defcustom counsel-describe-function-function 'describe-function
+  "Function to call to describe a function passed as parameter."
+  :type 'function
+  :group 'ivy)
+
 (defun counsel-describe-function-transformer (function-name)
   "Propertize FUNCTION-NAME if it's an interactive function."
   (if (commandp (intern function-name))
@@ -565,8 +570,7 @@ to `ivy-highlight-face'."
               :require-match t
               :sort t
               :action (lambda (x)
-                        (describe-function
-                         (intern x)))
+                        (funcall counsel-describe-function-function (intern 
x)))
               :caller 'counsel-describe-function)))
 
 ;;** `counsel-set-variable'

Reply via email to