emacs: migrate to use modulep!

`featurep!` is deprecated and it is pretty simple migrating to it.
This commit is contained in:
Gabriel Arazas 2022-09-19 21:29:30 +08:00
parent 7725082138
commit 43a8c3c077
4 changed files with 17 additions and 17 deletions

View File

@ -74,11 +74,11 @@
;; Custom keybindings ;; Custom keybindings
(map! (map!
(:when (featurep! :tools wiki) (:when (modulep! :tools wiki)
:leader :leader
:prefix "nr" :desc "Create the asset folder" "m" #'my/create-assets-folder) :prefix "nr" :desc "Create the asset folder" "m" #'my/create-assets-folder)
(:when (featurep! :editor format) (:when (modulep! :editor format)
:n "g=" #'+format/buffer)) :n "g=" #'+format/buffer))
;; A workaround for electric-indent plugin. ;; A workaround for electric-indent plugin.

View File

@ -17,7 +17,7 @@
(other-window 1) (other-window 1)
(org-roam-node-random)) (org-roam-node-random))
(when (featurep! +biblio) (when (modulep! +biblio)
(defvar +wiki-references-filename "references.bib") (defvar +wiki-references-filename "references.bib")
(defvar +wiki-bibliography-note-filename "references.org") (defvar +wiki-bibliography-note-filename "references.org")
(defvar +wiki-bibliography-file (f-join +wiki-directory +wiki-references-filename)) (defvar +wiki-bibliography-file (f-join +wiki-directory +wiki-references-filename))
@ -43,7 +43,7 @@
:config :config
(+wiki/biblio-setup))) (+wiki/biblio-setup)))
(when (featurep! +anki) (when (modulep! +anki)
(defvar +anki-cards-directory-name "cards") (defvar +anki-cards-directory-name "cards")
(defvar +anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name)) (defvar +anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name))
@ -85,11 +85,11 @@
(setq anki-editor-create-decks 't (setq anki-editor-create-decks 't
+anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name)))) +anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name))))
(when (featurep! +dendron) (when (modulep! +dendron)
(use-package! dendroam (use-package! dendroam
:after org-roam)) :after org-roam))
(when (featurep! +graph) (when (modulep! +graph)
(use-package! websocket (use-package! websocket
:after org-roam) :after org-roam)
@ -97,7 +97,7 @@
:after org-roam :after org-roam
:hook (org-roam . org-roam-ui-mode))) :hook (org-roam . org-roam-ui-mode)))
(when (featurep! +krita) (when (modulep! +krita)
(use-package! org-krita (use-package! org-krita
:after org-mode :after org-mode
:hook (org-mode . org-krita-mode))) :hook (org-mode . org-krita-mode)))

View File

@ -3,15 +3,15 @@
(unless (executable-find "sqlite3") (unless (executable-find "sqlite3")
(warn! "Couldn't find SQLite executable.")) (warn! "Couldn't find SQLite executable."))
(unless (featurep! :lang org) (unless (modulep! :lang org)
(warn! "Doom module ':lang org' is not enabled. This is a pointless addition to your configuration WTF")) (warn! "Doom module ':lang org' is not enabled. This is a pointless addition to your configuration WTF"))
(when (featurep! :lang org +roam) (when (modulep! :lang org +roam)
(warn! "org-roam v1 is installed. This module is primarily catered for org-roam v2.")) (warn! "org-roam v1 is installed. This module is primarily catered for org-roam v2."))
(when (featurep! +biblio) (when (modulep! +biblio)
(unless (executable-find "anystyle") (unless (executable-find "anystyle")
(warn! "Couldn't find AnyStyle CLI. The PDF scrapper from org-roam-bibtex will not work.")) (warn! "Couldn't find AnyStyle CLI. The PDF scrapper from org-roam-bibtex will not work."))
(unless (featurep! :tools biblio) (unless (modulep! :tools biblio)
(warn! "Doom module ':tools biblio' is not enabled. Completion functions will not work."))) (warn! "Doom module ':tools biblio' is not enabled. Completion functions will not work.")))

View File

@ -5,30 +5,30 @@
(package! org-roam (package! org-roam
:recipe (:host github :repo "org-roam/org-roam")) :recipe (:host github :repo "org-roam/org-roam"))
(when (featurep! +biblio) (when (modulep! +biblio)
(package! org-roam-bibtex (package! org-roam-bibtex
:recipe (:host github :repo "org-roam/org-roam-bibtex"))) :recipe (:host github :repo "org-roam/org-roam-bibtex")))
(when (featurep! +anki) (when (modulep! +anki)
(package! anki-editor (package! anki-editor
:recipe (:host github :recipe (:host github
:repo "louietan/anki-editor") :repo "louietan/anki-editor")
:pin "546774a453ef4617b1bcb0d1626e415c67cc88df")) :pin "546774a453ef4617b1bcb0d1626e415c67cc88df"))
(when (featurep! +markdown) (when (modulep! +markdown)
(package! md-roam (package! md-roam
:recipe (:host github :repo "nobiot/md-roam" :branch "v2"))) :recipe (:host github :repo "nobiot/md-roam" :branch "v2")))
(when (featurep! +dendron) (when (modulep! +dendron)
(package! dendroam (package! dendroam
:recipe (:host github :repo "vicrdguez/dendroam"))) :recipe (:host github :repo "vicrdguez/dendroam")))
(when (featurep! +graph) (when (modulep! +graph)
(package! simple-httpd) (package! simple-httpd)
(package! websocket) (package! websocket)
(package! org-roam-ui (package! org-roam-ui
:recipe (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out")))) :recipe (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out"))))
(when (featurep! +krita) (when (modulep! +krita)
(package! org-krita (package! org-krita
:recipe (:host github :repo "lepisma/org-krita" :files ("resources" "*.el")))) :recipe (:host github :repo "lepisma/org-krita" :files ("resources" "*.el"))))