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
|
@ -12,7 +12,7 @@ building will occur with fpm. Otherwise it will default to ifort
|
|||
or gfortran, depending on what feature flags are set."
|
||||
(interactive)
|
||||
(cond ((+fortran--fpm-toml) (+fortran/fpm-build))
|
||||
((featurep! +intel) (+fortran/ifort-compile))
|
||||
((modulep! +intel) (+fortran/ifort-compile))
|
||||
(t (+fortran/gfortran-compile))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -24,7 +24,7 @@ building will occur with fpm. Otherwise it will default to ifort
|
|||
or gfortran, depending on what feature flags are set."
|
||||
(interactive)
|
||||
(cond ((+fortran--fpm-toml) (+fortran/fpm-run))
|
||||
((featurep! +intel) (+fortran/ifort-run))
|
||||
((modulep! +intel) (+fortran/ifort-run))
|
||||
(t (+fortran/gfortran-run))))
|
||||
|
||||
(defun +fortran--exec-name ()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:config
|
||||
;; --- Compilation --- ;;
|
||||
;; Used by `compile' (SPC c c)
|
||||
(let ((cmd (cond ((featurep! +intel) "ifort ")
|
||||
(let ((cmd (cond ((modulep! +intel) "ifort ")
|
||||
(t "gfortran "))))
|
||||
(setq-hook! 'f90-mode-hook
|
||||
compile-command cmd
|
||||
|
@ -16,7 +16,7 @@
|
|||
(set-popup-rule! "^\\*fortran-compilation" :side 'right :size 0.5 :quit t)
|
||||
|
||||
;; --- LSP Configuration --- ;;
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(setq lsp-clients-fortls-args '("--enable_code_actions" "--hover_signature"))
|
||||
(add-hook 'f90-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
:desc "build" "b" #'+fortran/build
|
||||
:desc "run" "r" #'+fortran/run)
|
||||
|
||||
(when (featurep! +intel)
|
||||
(when (modulep! +intel)
|
||||
(map! :map f90-mode-map
|
||||
:localleader
|
||||
(:prefix ("i" . "ifort")
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
;; --- Compilation --- ;;
|
||||
;; Used by `compile' (SPC c c)
|
||||
(let ((cmd (cond ((featurep! +intel) "ifort ")
|
||||
(let ((cmd (cond ((modulep! +intel) "ifort ")
|
||||
(t "gfortran -std=legacy "))))
|
||||
(setq-hook! 'fortran-mode-hook
|
||||
compile-command cmd
|
||||
|
@ -71,7 +71,7 @@
|
|||
:desc "compile" "c" #'+fortran/gfortran-compile
|
||||
:desc "run" "r" #'+fortran/gfortran-run))
|
||||
|
||||
(when (featurep! +intel)
|
||||
(when (modulep! +intel)
|
||||
(map! :map fortran-mode-map
|
||||
:localleader
|
||||
(:prefix ("i" . "ifort")
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; lang/fortran/doctor.el
|
||||
|
||||
(assert! (or (not (featurep! +lsp))
|
||||
(featurep! :tools lsp))
|
||||
(assert! (or (not (modulep! +lsp))
|
||||
(modulep! :tools lsp))
|
||||
"This module requires (:tools lsp)")
|
||||
|
||||
(when (and (featurep! +intel)
|
||||
(when (and (modulep! +intel)
|
||||
(not (executable-find "ifort")))
|
||||
(warn! "Couldn't find Intel ifort - compilation will not work."))
|
||||
|
||||
(when (and (not (featurep! +intel))
|
||||
(when (and (not (modulep! +intel))
|
||||
(not (executable-find "gfortran")))
|
||||
(warn! "Couldn't find gfortran - compilation will not work."))
|
||||
|
||||
(unless (executable-find "fpm")
|
||||
(warn! "Couldn't find fpm - project building/testing will not work."))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(unless (executable-find "fortls")
|
||||
(warn! "Couldn't find fortls."))
|
||||
(unless (executable-find "fprettify")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue