branch: master
commit ce2ffaa061df40a1d2dc7124cf66d957cd0d0e58
Author: Damien Cassou <[email protected]>
Commit: Damien Cassou <[email protected]>
Make it possible to configure counsel-describe-variable
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 3d799c2..2bcdf5b 100644
--- a/counsel.el
+++ b/counsel.el
@@ -499,6 +499,11 @@ COUNT defaults to 1."
(push (symbol-name vv) cands))))
(delete "" cands)))
+(defcustom counsel-describe-variable-function 'describe-variable
+ "Function to call to describe a variable passed as parameter."
+ :type 'function
+ :group 'ivy)
+
(defun counsel-describe-variable-transformer (var)
"Propertize VAR if it's a custom variable."
(if (custom-variable-p (intern var))
@@ -525,8 +530,7 @@ Variables declared using `defcustom' are highlighted
according to
:require-match t
:sort t
:action (lambda (x)
- (describe-variable
- (intern x)))
+ (funcall counsel-describe-variable-function (intern x)))
:caller 'counsel-describe-variable)))
;;** `counsel-describe-function'