From 2aaea3a0d5aded00f488a49013009bbdd22053c7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Aug 2018 00:28:26 +0200 Subject: [PATCH] Use helpful for helm-apropos --- modules/completion/helm/config.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index bb28baad1..48542db64 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -125,7 +125,17 @@ be negative.") (let ((bg-color (face-background 'default nil))) `(:background ,bg-color :foreground ,bg-color))) (setq-local cursor-type nil)))) - (add-hook 'helm-minibuffer-set-up-hook #'+helm*hide-minibuffer-maybe)) + (add-hook 'helm-minibuffer-set-up-hook #'+helm*hide-minibuffer-maybe) + + ;; TODO Find a better way + (defun +helm*use-helpful (orig-fn &rest args) + (cl-letf (((symbol-function #'describe-function) + (symbol-function #'helpful-callable)) + ((symbol-function #'describe-variable) + (symbol-function #'helpful-variable))) + (apply orig-fn args))) + (advice-add #'helm-describe-variable :around #'+helm*use-helpful) + (advice-add #'helm-describe-function :around #'+helm*use-helpful)) (def-package! helm-flx