mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -1,5 +1,5 @@
|
||||
;;; checkers/spell/autoload/+flyspell.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +flyspell)
|
||||
;;;###if (modulep! +flyspell)
|
||||
|
||||
;;;###autodef
|
||||
(defalias 'flyspell-mode! #'flyspell-mode)
|
||||
|
@ -1,5 +1,5 @@
|
||||
;;; checkers/spell/autoload/+spell-fu.el -*- lexical-binding: t; -*-
|
||||
;;;###if (not (featurep! +flyspell))
|
||||
;;;###if (not (modulep! +flyspell))
|
||||
|
||||
(defun +spell--correct (replace poss word orig-pt start end)
|
||||
(cond ((eq replace 'ignore)
|
||||
@ -61,9 +61,9 @@
|
||||
(ispell-set-spellchecker-params)
|
||||
(save-current-buffer
|
||||
(ispell-accept-buffer-local-defs))
|
||||
(if (not (or (featurep! :completion ivy)
|
||||
(featurep! :completion helm)
|
||||
(featurep! :completion vertico)))
|
||||
(if (not (or (modulep! :completion ivy)
|
||||
(modulep! :completion helm)
|
||||
(modulep! :completion vertico)))
|
||||
(call-interactively #'ispell-word)
|
||||
(cl-destructuring-bind (start . end)
|
||||
(or (bounds-of-thing-at-point 'word)
|
||||
|
@ -21,9 +21,9 @@
|
||||
;; if their binary is found.
|
||||
;; If one of the flags `+aspell', `+hunspell' or `+enchant' is given,
|
||||
;; only enable that spell checker.
|
||||
(pcase (cond ((featurep! +aspell) 'aspell)
|
||||
((featurep! +hunspell) 'hunspell)
|
||||
((featurep! +enchant) 'enchant)
|
||||
(pcase (cond ((modulep! +aspell) 'aspell)
|
||||
((modulep! +hunspell) 'hunspell)
|
||||
((modulep! +enchant) 'enchant)
|
||||
((executable-find "aspell") 'aspell)
|
||||
((executable-find "hunspell") 'hunspell)
|
||||
((executable-find "enchant-2") 'enchant))
|
||||
@ -66,7 +66,7 @@
|
||||
;;
|
||||
;;; Implementations
|
||||
|
||||
(eval-if! (not (featurep! +flyspell))
|
||||
(eval-if! (not (modulep! +flyspell))
|
||||
|
||||
(use-package! spell-fu
|
||||
:when (executable-find "aspell")
|
||||
@ -74,9 +74,9 @@
|
||||
:general ([remap ispell-word] #'+spell/correct)
|
||||
:preface
|
||||
(defvar +spell-correct-interface
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
#'+spell-correct-ivy-fn)
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
#'+spell-correct-helm-fn)
|
||||
(#'+spell-correct-generic-fn))
|
||||
"Function to use to display corrections.")
|
||||
@ -129,7 +129,7 @@
|
||||
"Faces in certain major modes that spell-fu will not spellcheck.")
|
||||
|
||||
(setq spell-fu-directory (concat doom-etc-dir "spell-fu"))
|
||||
(when (featurep! +everywhere)
|
||||
(when (modulep! +everywhere)
|
||||
(add-hook! '(yaml-mode-hook
|
||||
conf-mode-hook
|
||||
prog-mode-hook)
|
||||
@ -184,7 +184,7 @@ directory first)."
|
||||
git-commit-mode-hook)
|
||||
#'flyspell-mode)
|
||||
|
||||
(when (featurep! +everywhere)
|
||||
(when (modulep! +everywhere)
|
||||
(add-hook! '(yaml-mode-hook
|
||||
conf-mode-hook
|
||||
prog-mode-hook)
|
||||
@ -228,11 +228,11 @@ e.g. proselint and langtool."
|
||||
:commands flyspell-correct-previous
|
||||
:general ([remap ispell-word] #'flyspell-correct-at-point)
|
||||
:config
|
||||
(cond ((and (featurep! :completion helm)
|
||||
(cond ((and (modulep! :completion helm)
|
||||
(require 'flyspell-correct-helm nil t)))
|
||||
((and (featurep! :completion ivy)
|
||||
((and (modulep! :completion ivy)
|
||||
(require 'flyspell-correct-ivy nil t)))
|
||||
((featurep! :completion vertico)) ; vertico doesn't need any extra configuration
|
||||
((modulep! :completion vertico)) ; vertico doesn't need any extra configuration
|
||||
((require 'flyspell-correct-popup nil t) ; only use popup if no compatible completion UI is enabled
|
||||
(setq flyspell-popup-correct-delay 0.8)
|
||||
(define-key popup-menu-keymap [escape] #'keyboard-quit))))
|
||||
|
@ -1,10 +1,10 @@
|
||||
;;; checkers/spell/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (or (not (featurep! +flyspell))
|
||||
(featurep! +aspell))
|
||||
(when (or (not (modulep! +flyspell))
|
||||
(modulep! +aspell))
|
||||
(unless (executable-find "aspell")
|
||||
(warn! "Couldn't find aspell executable; spell checker will not work")))
|
||||
|
||||
(when (featurep! +hunspell)
|
||||
(when (modulep! +hunspell)
|
||||
(unless (executable-find "hunspell")
|
||||
(warn! "Couldn't find hunspell executable; spell checker will not work")))
|
||||
|
@ -1,13 +1,13 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; checkers/spell/packages.el
|
||||
|
||||
(if (not (featurep! +flyspell))
|
||||
(if (not (modulep! +flyspell))
|
||||
(package! spell-fu :pin "8185467b24f05bceb428a0e9909651ec083cc54e")
|
||||
(package! flyspell-correct :pin "e9fde6f93af991b0528d6ed47d44bed470dc70af")
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
(package! flyspell-correct-ivy))
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
(package! flyspell-correct-helm))
|
||||
((not (featurep! :completion vertico))
|
||||
((not (modulep! :completion vertico))
|
||||
(package! flyspell-correct-popup)))
|
||||
(package! flyspell-lazy :pin "0fc5996bcee20b46cbd227ae948d343c3bef7339"))
|
||||
|
@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
(use-package! flycheck-posframe
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (flycheck-mode . +syntax-init-popups-h)
|
||||
:config
|
||||
(setq flycheck-posframe-warning-prefix "! "
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
(package! flycheck :pin "784f184cdd9f9cb4e3dbb997c09d93e954142842")
|
||||
(package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6")
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! flycheck-posframe :pin "8f60c9bf124ab9597d681504a73fdf116a0bde12"))
|
||||
|
||||
;; TODO flymake?
|
||||
|
Reference in New Issue
Block a user