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

@ -21,7 +21,7 @@
;; This is needed when `reftex-cite-format' is set. See
;; https://superuser.com/a/1386206
LaTeX-reftex-cite-format-auto-activate nil)
(when (featurep! :editor evil)
(when (modulep! :editor evil)
(add-hook 'reftex-mode-hook #'evil-normalize-keymaps))
(map! :map reftex-mode-map
:localleader

View file

@ -38,7 +38,7 @@
(add-to-list 'TeX-view-program-selection '(output-pdf "Evince"))))
(`pdf-tools
(when (featurep! :tools pdf)
(when (modulep! :tools pdf)
(add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools"))
(when IS-MAC
;; PDF Tools isn't in `TeX-view-program-list-builtin' on macs.

View file

@ -98,7 +98,7 @@ If no viewer is found, `latex-preview-pane-mode' is used.")
;; quotes or not, via `+latex-enable-plain-double-quotes'.
(sp-local-pair modes "``" nil :unless '(:add sp-in-math-p))))
;; Hook LSP, if enabled.
(when (featurep! +lsp)
(when (modulep! +lsp)
(add-hook! '(tex-mode-local-vars-hook
latex-mode-local-vars-hook)
:append #'lsp!))
@ -116,7 +116,7 @@ If no viewer is found, `latex-preview-pane-mode' is used.")
(use-package! tex-fold
:when (featurep! +fold)
:when (modulep! +fold)
:hook (TeX-mode . +latex-TeX-fold-buffer-h)
:hook (TeX-mode . TeX-fold-mode)
:config
@ -128,7 +128,7 @@ If no viewer is found, `latex-preview-pane-mode' is used.")
(advice-add #'cdlatex-math-symbol :after #'+latex-fold-last-macro-a)
(advice-add #'cdlatex-math-modify :after #'+latex-fold-last-macro-a)
;; Fold after snippets.
(when (featurep! :editor snippets)
(when (modulep! :editor snippets)
(add-hook! 'TeX-fold-mode-hook
(defun +latex-fold-snippet-contents-h ()
(add-hook! 'yas-after-exit-snippet-hook :local
@ -207,7 +207,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
(use-package! cdlatex
:when (featurep! +cdlatex)
:when (modulep! +cdlatex)
:hook (LaTeX-mode . cdlatex-mode)
:hook (org-mode . org-cdlatex-mode)
:config
@ -225,7 +225,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
"<" nil
;; TAB is used for CDLaTeX's snippets and navigation. But we have
;; Yasnippet for that.
(:when (featurep! :editor snippets)
(:when (modulep! :editor snippets)
"TAB" nil)
;; AUCTeX takes care of auto-inserting {} on _^ if you want, with
;; `TeX-electric-sub-and-superscript'.
@ -242,7 +242,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
(use-package! auctex-latexmk
:when (featurep! +latexmk)
:when (modulep! +latexmk)
:after latex
:init
;; Pass the -pdf flag when TeX-PDF-mode is active.
@ -255,12 +255,12 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
(use-package! evil-tex
:when (featurep! :editor evil +everywhere)
:when (modulep! :editor evil +everywhere)
:hook (LaTeX-mode . evil-tex-mode))
(use-package! company-auctex
:when (featurep! :completion company)
:when (modulep! :completion company)
:defer t
:init
(add-to-list '+latex--company-backends #'company-auctex-environments nil #'eq)
@ -268,7 +268,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
(use-package! company-math
:when (featurep! :completion company)
:when (modulep! :completion company)
:defer t
:init
(add-to-list '+latex--company-backends #'+latex-symbols-company-backend nil #'eq))

View file

@ -7,20 +7,20 @@
:pin "830e40a0639aedc6c362a3a01e160aaa8246bb99")
(package! adaptive-wrap :pin "0d5b4a07de76d87dd64333a566a8a0a845f2b9f0")
(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e")
(when (featurep! :editor evil +everywhere)
(when (modulep! :editor evil +everywhere)
(package! evil-tex :pin "0fa85c3fc88d96621002b5a1b79efcc06776642f"))
;; Optional module features.
(when (featurep! +latexmk)
(when (modulep! +latexmk)
(package! auctex-latexmk :pin "4d353522650d7685acbf1d38f7dbc504f734bd84"))
(when (featurep! +cdlatex)
(when (modulep! +cdlatex)
(package! cdlatex :pin "8e963c68531f75e459e8ebe7a34fd3ba9d3729a0"))
;; Features according to other user selected options.
(when (featurep! :completion company)
(when (modulep! :completion company)
(package! company-auctex :pin "9400a2ec7459dde8cbf1a5d50dfee4e300ed7e18")
(package! company-reftex :pin "42eb98c6504e65989635d95ab81b65b9d5798e76")
(package! company-math :pin "45778f5731c97a21a83e3b965cbde42018709afd"))