mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-18 16:06:56 -05:00
Refactor core-docs.el
This commit is contained in:
@@ -4,14 +4,13 @@
|
||||
(evil-define-command doom:docs-lookup (&optional bang input)
|
||||
"Look up INPUT (otherwise the current selection) in Dash or Zeal."
|
||||
(interactive "<!><a>")
|
||||
(let ((docset (unless bang (dash-at-point-guess-docset)))
|
||||
(query input))
|
||||
(let ((query input))
|
||||
(when (evil-visual-state-p)
|
||||
(setq query (concat (buffer-substring-no-properties (region-beginning) (region-end))
|
||||
" " query)))
|
||||
(when (or (not query) (zerop (length query)))
|
||||
(setq query (thing-at-point 'symbol)))
|
||||
(doom-docs-lookup query docset)))
|
||||
(doom-docs-lookup query bang)))
|
||||
|
||||
(provide 'defuns-docs)
|
||||
;;; defuns-docs.el ends here
|
||||
|
Reference in New Issue
Block a user