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

@ -13,7 +13,7 @@
(defun =calendar ()
"Activate (or switch to) `calendar' in its workspace."
(interactive)
(if (featurep! :ui workspaces)
(if (modulep! :ui workspaces)
(progn
(+workspace-switch "Calendar" t)
(doom/switch-to-scratch-buffer)
@ -28,7 +28,7 @@
(defun +calendar/quit ()
"TODO"
(interactive)
(if (featurep! :ui workspaces)
(if (modulep! :ui workspaces)
(when (+workspace-exists-p "Calendar")
(+workspace/delete "Calendar"))
(when (window-configuration-p +calendar--wconf)

View file

@ -25,7 +25,7 @@
(set-popup-rule! "^\\*cfw:details" :quit t :ttl 0 :select t :size 0.4)
(define-key cfw:calendar-mode-map "q" #'+calendar/quit)
(when (featurep! :editor evil +everywhere)
(when (modulep! :editor evil +everywhere)
(set-evil-initial-state! '(cfw:calendar-mode cfw:details-mode) 'motion)
(add-hook! (cfw:calendar-mode cfw:details-mode) #'evil-normalize-keymaps)
(map! (:map cfw:calendar-mode-map

View file

@ -3,7 +3,7 @@
(defvar +irc--workspace-name "*IRC*")
(defun +irc-setup-wconf (&optional inhibit-workspace)
(when (and (featurep! :ui workspaces)
(when (and (modulep! :ui workspaces)
(not inhibit-workspace))
(+workspace-switch +irc--workspace-name 'auto-create))
(let ((buffers (doom-buffers-in-mode 'circe-mode nil t)))
@ -58,7 +58,7 @@ workspace for it."
(cancel-timer +irc--defer-timer))
(disable-circe-notifications)
(mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t))
(when (featurep! :ui workspaces)
(when (modulep! :ui workspaces)
(when (equal (+workspace-current-name) +irc--workspace-name)
(+workspace/delete +irc--workspace-name)))))
@ -68,8 +68,8 @@ workspace for it."
argument) is non-nil only show channels in current server."
(interactive "P")
(call-interactively
(cond ((featurep! :completion ivy) #'+irc/ivy-jump-to-channel)
((featurep! :completion vertico) #'+irc/vertico-jump-to-channel)
(cond ((modulep! :completion ivy) #'+irc/ivy-jump-to-channel)
((modulep! :completion vertico) #'+irc/vertico-jump-to-channel)
((user-error "No jump-to-channel backend is enabled. Enable vertico or ivy!")))))
;;;###autoload

View file

@ -1,5 +1,5 @@
;;; app/irc/autoload/ivy.el -*- lexical-binding: t; -*-
;;;###if (featurep! :completion ivy)
;;;###if (modulep! :completion ivy)
;;;###autoload
(defun +irc/ivy-jump-to-channel (&optional this-server)

View file

@ -1,5 +1,5 @@
;;; app/irc/autoload/vertico.el -*- lexical-binding: t; -*-
;;;###if (featurep! :completion vertico)
;;;###if (modulep! :completion vertico)
;;;###autoload
(defun +irc/vertico-jump-to-channel ()

View file

@ -141,7 +141,7 @@ playback.")
;; Fail gracefully if not in a circe buffer
(global-set-key [remap tracking-next-buffer] #'+irc/tracking-next-buffer)
(when (featurep! :completion vertico)
(when (modulep! :completion vertico)
(after! consult
(add-to-list 'consult-buffer-sources '+irc--consult-circe-source 'append)))
@ -198,7 +198,7 @@ playback.")
(define-key lui-mode-map "\C-u" #'lui-kill-to-beginning-of-line)
(setq lui-fill-type nil)
(when (featurep! :checkers spell)
(when (modulep! :checkers spell)
(setq lui-flyspell-p t))
(after! evil

View file

@ -6,7 +6,7 @@
(defun =rss ()
"Activate (or switch to) `elfeed' in its workspace."
(interactive)
(if (featurep! :ui workspaces)
(if (modulep! :ui workspaces)
(progn
(+workspace-switch +rss-workspace-name t)
(doom/switch-to-scratch-buffer)
@ -98,7 +98,7 @@
(remove-hook 'kill-buffer-hook #'+rss-cleanup-h :local)
(kill-buffer b)))
(mapc #'kill-buffer show-buffers))
(if (and (featurep! :ui workspaces)
(if (and (modulep! :ui workspaces)
(+workspace-exists-p +rss-workspace-name))
(+workspace/delete +rss-workspace-name)
(when (window-configuration-p +rss--wconf)

View file

@ -56,7 +56,7 @@ easier to scroll through.")
(define-key! elfeed-show-mode-map
[remap next-buffer] #'+rss/next
[remap previous-buffer] #'+rss/previous))
(when (featurep! :editor evil +everywhere)
(when (modulep! :editor evil +everywhere)
(evil-define-key 'normal elfeed-search-mode-map
"q" #'elfeed-kill-buffer
"r" #'elfeed-search-update--force
@ -68,7 +68,7 @@ easier to scroll through.")
(use-package! elfeed-org
:when (featurep! +org)
:when (modulep! +org)
:after elfeed
:preface
(setq rmh-elfeed-org-files (list "elfeed.org"))

View file

@ -3,5 +3,5 @@
(package! elfeed :pin "162d7d545ed41c27967d108c04aa31f5a61c8e16")
(package! elfeed-goodies :pin "c9d9cd196746add3010d74f43b5c9866562f39fb")
(when (featurep! +org)
(when (modulep! +org)
(package! elfeed-org :pin "d28c858303e60dcb3a6eb18ea85ee3cb9e3dd623"))

View file

@ -29,7 +29,7 @@ that works with the ui/popup module."
(interactive "P")
(condition-case _
(progn
(if (and (not arg) (featurep! :ui workspaces))
(if (and (not arg) (modulep! :ui workspaces))
(+workspace/new +twitter-workspace-name)
(setq +twitter--old-wconf (current-window-configuration))
(delete-other-windows)
@ -52,7 +52,7 @@ that works with the ui/popup module."
(when (eq major-mode 'twittering-mode)
(twittering-kill-buffer)
(cond ((one-window-p) (+twitter/quit-all))
((featurep! :ui workspaces)
((modulep! :ui workspaces)
(+workspace/close-window-or-workspace))
((delete-window)))))
@ -60,7 +60,7 @@ that works with the ui/popup module."
(defun +twitter/quit-all ()
"Close all open `twitter-mode' buffers and the associated workspace, if any."
(interactive)
(when (featurep! :ui workspaces)
(when (modulep! :ui workspaces)
(+workspace/delete +twitter-workspace-name))
(when +twitter--old-wconf
(set-window-configuration +twitter--old-wconf)

View file

@ -35,7 +35,7 @@
:group 'twittering-mode)
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
(when (featurep! :ui popup)
(when (modulep! :ui popup)
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn))
;; Custom header-line for twitter buffers
@ -54,7 +54,7 @@
[remap twittering-kill-buffer] #'+twitter/quit
[remap delete-window] #'+twitter/quit
[remap +workspace/close-window-or-workspace] #'+twitter/quit)
(when (featurep! :editor evil +everywhere)
(when (modulep! :editor evil +everywhere)
(define-key! twittering-mode-map
[remap evil-window-delete] #'+twitter/quit
"f" #'twittering-favorite