refactor: do Emacs version check at compile time too
In case the user tries to byte-compile Doom with the wrong version of Emacs.
This commit is contained in:
parent
3a0f1aa3ef
commit
75881c7d45
1 changed files with 26 additions and 25 deletions
|
@ -49,9 +49,10 @@
|
|||
;;
|
||||
;;; Code:
|
||||
|
||||
;; Doom's minimum supported version of Emacs is 27.1. Its my goal to support one
|
||||
;; major version below the stable release, for about a year or until stable is
|
||||
;; ubiquitous (or at least easily accessible) across Linux distros.
|
||||
(eval-and-compile ; Check version at both compile and runtime.
|
||||
;; Doom's minimum supported version of Emacs is 27.1. Its my goal to support
|
||||
;; one major version below the stable release, for about a year or until
|
||||
;; stable is ubiquitous (or at least easily accessible) across Linux distros.
|
||||
(when (< emacs-major-version 27)
|
||||
(user-error
|
||||
(concat
|
||||
|
@ -73,7 +74,7 @@
|
|||
(concat " $ EMACS=/path/to/valid/emacs " command " ...\n"
|
||||
" $ EMACS=\"/Applications/Emacs.app/Contents/MacOS/Emacs\" " command " ...\n"
|
||||
" $ EMACS=\"snap run emacs\" " command " ...\n"))
|
||||
"\nAborting...")))))
|
||||
"\nAborting..."))))))
|
||||
|
||||
;; Doom needs to be synced/rebuilt if either Doom or Emacs has been
|
||||
;; up/downgraded. This is because byte-code isn't backwards compatible, and many
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue