refactor: deprecate EMACS2[89]+, NATIVECOMP, MODULES
To reduce redundancy, remove the maintenance hassle that version constants would impose later on, and rely on built-in facilities (featurep) more over global variables or doomisms, these global constants have been deprecated in favor of Emacs "features": - EMACS28+ -- replace with (> emacs-major-version 27) - EMACS29+ -- replace with (> emacs-major-version 28) - NATIVECOMP -- replace with (featurep 'native-compile) - MODULES -- replace with (featurep 'dynamic-modules) (These constants will be formally removed when v3 is released. The IS-* constants are likely next, but I haven't decided on their substitutes yet) I also decided to follow native-compile's example and provide features for Emacs' system features (since system-configuration-features' docs outs itself as a poor method to detect features): - dynamic-modules - jansson - native-compile -- this one already exists, but will instead be removed if it's non-functional; i.e. (native-comp-available-p) returns nil. These are now detectable using featurep, which is fast and built-in.
This commit is contained in:
parent
c540f1b515
commit
0407621aff
12 changed files with 54 additions and 35 deletions
|
@ -53,7 +53,7 @@ directives. By default, this only recognizes C directives.")
|
|||
evil-undo-system
|
||||
(cond ((featurep! :emacs undo +tree) 'undo-tree)
|
||||
((featurep! :emacs undo) 'undo-fu)
|
||||
(EMACS28+ 'undo-redo)))
|
||||
((> emacs-major-version 27) 'undo-redo)))
|
||||
|
||||
;; Slow this down from 0.02 to prevent blocking in large or folded buffers
|
||||
;; like magit while incrementally highlighting matches.
|
||||
|
|
|
@ -136,7 +136,7 @@ variable for an explanation of the defaults (in comments). See
|
|||
elisp-slime-nav
|
||||
embark
|
||||
emms
|
||||
,@(when EMACS29+ '(emoji))
|
||||
,@(if (> emacs-major-version 28) '(emoji))
|
||||
epa
|
||||
ert
|
||||
eshell
|
||||
|
@ -226,7 +226,7 @@ variable for an explanation of the defaults (in comments). See
|
|||
scroll-lock
|
||||
selectrum
|
||||
sh-script
|
||||
,@(when EMACS28+ '(shortdoc))
|
||||
,@(if (> emacs-major-version 27) '(shortdoc))
|
||||
simple
|
||||
simple-mpc
|
||||
slime
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; emacs/vc/autoload/bug-reference-backport.el -*- lexical-binding: t; -*-
|
||||
;;;###if (not EMACS28+)
|
||||
;;;###if (< emacs-major-version 28)
|
||||
;; DEPRECATED Remove when Emacs 27.x support is dropped
|
||||
|
||||
;; In Emacs 28, the built-in bug-reference package started consulting vc for
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; term/eshell/autoload/mode.el -*- lexical-binding: t; -*-
|
||||
;;;###if (not EMACS28+)
|
||||
;;;###if (< emacs-major-version 28)
|
||||
|
||||
;; DEPRECATED Remove this when we drop Emacs 27 support.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; term/vterm/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! vterm
|
||||
:when (bound-and-true-p module-file-suffix)
|
||||
:when (featurep 'dynamic-modules)
|
||||
:commands vterm-mode
|
||||
:hook (vterm-mode . doom-mark-buffer-as-real-h)
|
||||
:hook (vterm-mode . hide-mode-line-mode) ; modeline serves no purpose in vterm
|
||||
|
|
|
@ -179,7 +179,7 @@ and cannot run in."
|
|||
|
||||
;; Harfbuzz and Mac builds do not need font-specific ligature support
|
||||
;; if they are above emacs-27.
|
||||
((and EMACS28+
|
||||
((and (> emacs-major-version 27)
|
||||
(or (featurep 'ns)
|
||||
(string-match-p "HARFBUZZ" system-configuration-features))
|
||||
(featurep 'composite)) ; Emacs loads `composite' at startup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue