featurep! will be renamed modulep! in the future, so it's been deprecated. They have identical interfaces, and can be replaced without issue. featurep! was never quite the right name for this macro. It implied that it had some connection to featurep, which it doesn't (only that it was similar in purpose; still, Doom modules are not features). To undo such implications and be consistent with its namespace (and since we're heading into a storm of breaking changes with the v3 release anyway), now was the best opportunity to begin the transition.
22 lines
1,010 B
EmacsLisp
22 lines
1,010 B
EmacsLisp
;;; tools/lookup/autoload/evil.el -*- lexical-binding: t; -*-
|
|
;;;###if (modulep! :editor evil)
|
|
|
|
;;;###autoload (autoload '+lookup:online "tools/lookup/autoload/evil" nil t)
|
|
(evil-define-command +lookup:online (query &optional bang)
|
|
"Look up QUERY online. Will prompt for search engine the first time, then
|
|
reuse it on consecutive uses of this command. If BANG, always prompt for search
|
|
engine."
|
|
(interactive "<a><!>")
|
|
(+lookup/online query (+lookup--online-provider bang 'evil-ex)))
|
|
|
|
;;;###autoload (autoload '+lookup:dash "tools/lookup/autoload/evil" nil t)
|
|
(evil-define-command +lookup:dash (query &optional bang)
|
|
"Look up QUERY in your dash docsets. If BANG, prompt to select a docset (and
|
|
install it if necessary)."
|
|
(interactive "<a><!>")
|
|
(let (selected)
|
|
(when bang
|
|
(setq selected (helm-dash-read-docset "Select docset" (helm-dash-official-docsets)))
|
|
(unless (dash-docs-docset-path selected)
|
|
(+lookup/install-docset selected)))
|
|
(+lookup/in-docsets query selected)))
|