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 @@
;;; ui/vc-gutter/autoload/diff-hl.el -*- lexical-binding: t; -*-
;;;###if (featurep! +diff-hl)
;;;###if (modulep! +diff-hl)
;;;###autoload
(defalias '+vc-gutter/stage-hunk #'diff-hl-stage-current-hunk)

View file

@ -1,5 +1,5 @@
;;; ui/vc-gutter/autoload/vc-gutter.el -*- lexical-binding: t; -*-
;;;###if (not (featurep! +diff-hl))
;;;###if (not (modulep! +diff-hl))
;;;###autoload
(defalias '+vc-gutter/stage-hunk #'git-gutter:stage-hunk)

View file

@ -11,7 +11,7 @@
;;
;;; Default styles
(when (featurep! +pretty)
(when (modulep! +pretty)
;; UI: make the fringe small enough that the diff bars aren't too domineering,
;; while leaving enough room for other indicators.
(if (fboundp 'fringe-mode) (fringe-mode '8))
@ -23,7 +23,7 @@
;; to shrink the fringe and sacrifice precious space for other fringe
;; indicators (like flycheck or flyspell).
;; TODO Extract these into a package with faces that themes can target.
(if (not (featurep! +diff-hl))
(if (not (modulep! +diff-hl))
(after! git-gutter-fringe
(define-fringe-bitmap 'git-gutter-fr:added [224]
nil nil '(center repeated))
@ -65,7 +65,7 @@
;;; git-gutter
(use-package! git-gutter
:unless (featurep! +diff-hl)
:unless (modulep! +diff-hl)
:commands git-gutter:revert-hunk git-gutter:stage-hunk
:init
(add-hook! 'find-file-hook
@ -146,7 +146,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
;;; diff-hl
(use-package! diff-hl
:when (featurep! +diff-hl)
:when (modulep! +diff-hl)
:hook (find-file . diff-hl-mode)
:hook (vc-dir-mode . diff-hl-dir-mode)
:hook (dired-mode . diff-hl-dired-mode)
@ -165,7 +165,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
(setq diff-hl-show-staged-changes nil)
;; UX: Update diffs when it makes sense too, without being too slow
(when (featurep! :editor evil)
(when (modulep! :editor evil)
(map! :after diff-hl-show-hunk
:map diff-hl-show-hunk-map
:n "p" #'diff-hl-show-hunk-previous
@ -186,7 +186,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
(bound-and-true-p diff-hl-dir-mode))
(diff-hl-update-once))))))
;; UX: Update diff-hl when magit alters git state.
(when (featurep! :tools magit)
(when (modulep! :tools magit)
(add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh)
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))
@ -203,7 +203,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
(apply fn args)))
;; UX: Don't delete the current hunk's indicators while we're editing
(when (featurep! :editor evil)
(when (modulep! :editor evil)
(add-hook! 'diff-hl-flydiff-mode-hook
(defun +vc-gutter-init-flydiff-mode-h ()
(if (not diff-hl-flydiff-mode)

View file

@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; ui/vc-gutter/packages.el
(if (featurep! +diff-hl)
(if (modulep! +diff-hl)
(package! diff-hl :pin "dabb7be6283488abd8d232ea8ce590d502713ed8")
(package! git-gutter-fringe :pin "648cb5b57faec55711803cdc9434e55a733c3eba"))