Use helpful for helm-apropos

This commit is contained in:
Henrik Lissner 2018-08-06 00:28:26 +02:00
parent b56404f0ce
commit 2aaea3a0d5
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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