lang/emacs-lisp: make company-elisp use helpful
Instead of describe-*
This commit is contained in:
parent
62f2f6af48
commit
5005721039
2 changed files with 10 additions and 0 deletions
|
@ -284,6 +284,13 @@ successfully sets indent_style/indent_size.")
|
|||
[remap describe-key] #'helpful-key
|
||||
[remap describe-symbol] #'doom/describe-symbol)
|
||||
|
||||
(defun doom-use-helpful-a (orig-fn &rest args)
|
||||
"Force ORIG-FN to use helpful instead of the old describe-* commands."
|
||||
(cl-letf (((symbol-function #'describe-function) #'helpful-function)
|
||||
((symbol-function #'describe-variable) #'helpful-variable)
|
||||
((symbol-function #'help-buffer) #'current-buffer))
|
||||
(apply orig-fn args)))
|
||||
|
||||
(after! apropos
|
||||
;; patch apropos buttons to call helpful instead of help
|
||||
(dolist (fun-bt '(apropos-function apropos-macro apropos-command))
|
||||
|
|
|
@ -56,6 +56,9 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
|||
(lisp-indent-defform state indent-point)))
|
||||
(put 'add-hook 'lisp-indent-function #'+emacs-lisp--indent-add-hook-fn)
|
||||
|
||||
;; Use helpful instead of describe-* from `company'
|
||||
(advice-add #'elisp--company-doc-buffer :around #'doom-use-helpful-a)
|
||||
|
||||
(add-hook! 'emacs-lisp-mode-hook
|
||||
#'(outline-minor-mode
|
||||
;; fontificiation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue