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:
parent
0407621aff
commit
ad6a3d0f33
316 changed files with 1109 additions and 1103 deletions
|
@ -32,7 +32,7 @@ generate `completing-read' candidates."
|
|||
(defun +default/new-buffer ()
|
||||
"TODO"
|
||||
(interactive)
|
||||
(if (featurep! 'evil)
|
||||
(if (modulep! 'evil)
|
||||
(call-interactively #'evil-buffer-new)
|
||||
(let ((buffer (generate-new-buffer "*new*")))
|
||||
(set-window-buffer nil buffer)
|
||||
|
@ -54,17 +54,17 @@ generate `completing-read' candidates."
|
|||
If the the vertico and lsp modules are active, list lsp diagnostics for the
|
||||
current project. Otherwise list them for the current buffer"
|
||||
(interactive)
|
||||
(cond ((and (featurep! :completion vertico)
|
||||
(featurep! :tools lsp)
|
||||
(cond ((and (modulep! :completion vertico)
|
||||
(modulep! :tools lsp)
|
||||
(bound-and-true-p lsp-mode))
|
||||
(consult-lsp-diagnostics arg))
|
||||
((and (featurep! :checkers syntax)
|
||||
((and (modulep! :checkers syntax)
|
||||
(bound-and-true-p flycheck-mode))
|
||||
(if (featurep! :completion vertico)
|
||||
(if (modulep! :completion vertico)
|
||||
(consult-flycheck)
|
||||
(flycheck-list-errors)))
|
||||
((bound-and-true-p flymake-mode)
|
||||
(if (featurep! :completion vertico)
|
||||
(if (modulep! :completion vertico)
|
||||
(consult-flymake)
|
||||
(flymake-show-diagnostics-buffer)))
|
||||
(t
|
||||
|
|
|
@ -10,9 +10,9 @@ If prefix ARG is set, prompt for a directory to search from."
|
|||
(read-directory-name "Search directory: ")
|
||||
default-directory)))
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((featurep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((featurep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(cond ((modulep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((modulep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((modulep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(#'rgrep)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -27,9 +27,9 @@ If prefix ARG is set, prompt for a directory to search from."
|
|||
(interactive)
|
||||
(let ((default-directory doom-emacs-dir))
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((featurep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((featurep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(cond ((modulep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((modulep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((modulep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(#'rgrep)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -52,13 +52,13 @@ input and search the whole buffer for it."
|
|||
(deactivate-mark)
|
||||
(when multiline-p
|
||||
(narrow-to-region start end)))
|
||||
(cond ((or (featurep! :completion helm)
|
||||
(featurep! :completion ivy))
|
||||
(cond ((or (modulep! :completion helm)
|
||||
(modulep! :completion ivy))
|
||||
(call-interactively
|
||||
(if (and start end (not multiline-p))
|
||||
#'swiper-isearch-thing-at-point
|
||||
#'swiper-isearch)))
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
(if (and start end (not multiline-p))
|
||||
(consult-line
|
||||
(replace-regexp-in-string
|
||||
|
@ -82,9 +82,9 @@ If prefix ARG is set, include ignored/hidden files."
|
|||
(user-error "There are no known projects"))
|
||||
default-directory)))
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+ivy/project-search)
|
||||
((featurep! :completion helm) #'+helm/project-search)
|
||||
((featurep! :completion vertico) #'+vertico/project-search)
|
||||
(cond ((modulep! :completion ivy) #'+ivy/project-search)
|
||||
((modulep! :completion helm) #'+helm/project-search)
|
||||
((modulep! :completion vertico) #'+vertico/project-search)
|
||||
(#'projectile-ripgrep)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -105,11 +105,11 @@ If prefix ARG is set, prompt for a known project to search from."
|
|||
(completing-read "Search project: " projects nil t)
|
||||
(user-error "There are no known projects"))
|
||||
(doom-project-root default-directory)))))
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
(+ivy/project-search nil symbol dir))
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
(+helm/project-search nil symbol dir))
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
(+vertico/project-search nil symbol dir))
|
||||
((rgrep (regexp-quote symbol)))))
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ possible, or just one char if that's not possible."
|
|||
(insert-char ?\s (- ocol (current-column)) nil))))
|
||||
;;
|
||||
((= n 1)
|
||||
(cond ((or (not (featurep! +smartparens))
|
||||
(cond ((or (not (modulep! +smartparens))
|
||||
(not (bound-and-true-p smartparens-mode))
|
||||
(and (memq (char-before) (list ?\ ?\t))
|
||||
(save-excursion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue