refactor: deprecate featurep! for modulep!

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.
This commit is contained in:
Henrik Lissner 2022-08-12 20:29:19 +02:00
parent 0407621aff
commit ad6a3d0f33
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
316 changed files with 1109 additions and 1103 deletions

View file

@ -1,5 +1,5 @@
;; completion/ivy/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :editor evil)
;;;###if (modulep! :editor evil)
;;;###autoload (autoload '+ivy:project-search "completion/ivy/autoload/evil" nil t)
(evil-define-command +ivy:project-search (query &optional all-files-p)

View file

@ -1,5 +1,5 @@
;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*-
;;;###if (featurep! :ui hydra)
;;;###if (modulep! :ui hydra)
;;;###autoload
(after! ivy-hydra

View file

@ -281,7 +281,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
(replace-regexp-in-string
"[! |]" (lambda (substr)
(cond ((and (string= substr " ")
(not (featurep! +fuzzy)))
(not (modulep! +fuzzy)))
" ")
((string= substr "|")
"\\\\\\\\|")

View file

@ -1,5 +1,5 @@
;;; completion/ivy/autoload/posframe.el -*- lexical-binding: t; -*-
;;;###if (featurep! +childframe)
;;;###if (modulep! +childframe)
;;;###autoload
(defun +ivy-display-at-frame-center-near-bottom-fn (str)

View file

@ -22,11 +22,11 @@ results buffer.")
:hook (doom-first-input . ivy-mode)
:init
(let ((standard-search-fn
(if (featurep! +prescient)
(if (modulep! +prescient)
#'+ivy-prescient-non-fuzzy
#'ivy--regex-plus))
(alt-search-fn
(if (featurep! +fuzzy)
(if (modulep! +fuzzy)
#'ivy--regex-fuzzy
;; Ignore order for non-fuzzy searches by default
#'ivy--regex-ignore-order)))
@ -116,7 +116,7 @@ results buffer.")
:config
(setq ivy-rich-parse-remote-buffer nil)
(when (featurep! +icons)
(when (modulep! +icons)
(cl-pushnew '(+ivy-rich-buffer-icon)
(cadr (plist-get ivy-rich-display-transformers-list
'ivy-switch-buffer))
@ -160,7 +160,7 @@ results buffer.")
(use-package! all-the-icons-ivy
:when (featurep! +icons)
:when (modulep! +icons)
:after ivy
:config
;; `all-the-icons-ivy' is incompatible with ivy-rich's switch-buffer
@ -335,7 +335,7 @@ results buffer.")
;; no highlighting visited files; slows down the filtering
(ivy-set-display-transformer #'counsel-projectile-find-file nil)
(when (featurep! +prescient)
(when (modulep! +prescient)
(setq counsel-projectile-sort-files t)))
@ -345,7 +345,7 @@ results buffer.")
(use-package! ivy-posframe
:when (featurep! +childframe)
:when (modulep! +childframe)
:hook (ivy-mode . ivy-posframe-mode)
:config
(setq ivy-fixed-height-minibuffer nil
@ -369,23 +369,23 @@ results buffer.")
(use-package! flx
:when (featurep! +fuzzy)
:unless (featurep! +prescient)
:when (modulep! +fuzzy)
:unless (modulep! +prescient)
:defer t ; is loaded by ivy
:preface (setq ivy--flx-featurep (featurep! +fuzzy))
:preface (setq ivy--flx-featurep (modulep! +fuzzy))
:init (setq ivy-flx-limit 10000))
(use-package! ivy-avy
:after ivy)
(use-package! ivy-prescient
:when (featurep! +prescient)
:when (modulep! +prescient)
:hook (ivy-mode . ivy-prescient-mode)
:hook (ivy-prescient-mode . prescient-persist-mode)
:commands +ivy-prescient-non-fuzzy
:init
(setq prescient-filter-method
(if (featurep! +fuzzy)
(if (modulep! +fuzzy)
'(literal regexp initialism fuzzy)
'(literal regexp initialism)))
:config

View file

@ -12,13 +12,13 @@
(package! ivy-rich :pin "600b8183ed0be8668dcc548cc2c8cb94b001363b")
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
(if (featurep! +prescient)
(if (modulep! +prescient)
(package! ivy-prescient :pin "c5295a9eecbd2935bb57684a4422638e03bf738c")
(when (featurep! +fuzzy)
(when (modulep! +fuzzy)
(package! flx :pin "e3b3f0533e44c5250ce73d728b59a7e96c692b5d")))
(when (featurep! +childframe)
(when (modulep! +childframe)
(package! ivy-posframe :pin "533a8e368fcabfd534761a5c685ce713376fa594"))
(when (featurep! +icons)
(when (modulep! +icons)
(package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d"))