Replace doom/describe-symbol w/ helpful-symbol

And helpful-at-point.
This commit is contained in:
Henrik Lissner 2020-01-11 17:21:35 -05:00
parent 52b69ec7eb
commit 29250133e8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 3 additions and 18 deletions

View file

@ -105,21 +105,6 @@ selection of all minor-modes, active or not."
(helpful-function symbol) (helpful-function symbol)
(helpful-variable symbol)))) (helpful-variable symbol))))
;;;###autoload
(defun doom/describe-symbol (symbol)
"Show help for SYMBOL, a variable, function or macro."
(interactive
(list (helpful--read-symbol "Symbol: " #'helpful--bound-p)))
(let* ((sym (intern-soft symbol))
(bound (boundp sym))
(fbound (fboundp sym)))
(cond ((and sym bound (not fbound))
(helpful-variable sym))
((and sym fbound (not bound))
(helpful-callable sym))
((apropos (format "^%s\$" symbol)))
((apropos (format "%s" symbol))))))
;; ;;
;;; Documentation commands ;;; Documentation commands

View file

@ -389,7 +389,7 @@ files, so we replace calls to `pp' with the much faster `prin1'."
(global-set-key [remap describe-command] #'helpful-command) (global-set-key [remap describe-command] #'helpful-command)
(global-set-key [remap describe-variable] #'helpful-variable) (global-set-key [remap describe-variable] #'helpful-variable)
(global-set-key [remap describe-key] #'helpful-key) (global-set-key [remap describe-key] #'helpful-key)
(global-set-key [remap describe-symbol] #'doom/describe-symbol) (global-set-key [remap describe-symbol] #'helpful-symbol)
(defun doom-use-helpful-a (orig-fn &rest args) (defun doom-use-helpful-a (orig-fn &rest args)
"Force ORIG-FN to use helpful instead of the old describe-* commands." "Force ORIG-FN to use helpful instead of the old describe-* commands."

View file

@ -123,8 +123,8 @@ if it's callable, `apropos' otherwise."
(when (invisible-p (point)) (when (invisible-p (point))
(org-show-hidden-entry)))) (org-show-hidden-entry))))
t)) t))
(thing (doom/describe-symbol thing)) (thing (helpful-symbol (intern thing)))
((call-interactively #'doom/describe-symbol)))) ((call-interactively #'helpful-at-point))))
;; FIXME ;; FIXME
;; (defun +emacs-lisp-lookup-file (thing) ;; (defun +emacs-lisp-lookup-file (thing)