mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: early-init: expand string-remove-suffix
Some builds of Emacs inexplicably fail to autoload subr-x at startup, meaning functions like string-remove-suffix are not guaranteed to be available. Rather than eagerly load the library too early, I opt for the safer option: to expand the single call into its lower level components. Ref: #7608
This commit is contained in:
@ -84,7 +84,10 @@
|
|||||||
(or (load (expand-file-name
|
(or (load (expand-file-name
|
||||||
(format (let ((lfile (getenv-internal "DOOMPROFILELOADFILE")))
|
(format (let ((lfile (getenv-internal "DOOMPROFILELOADFILE")))
|
||||||
(if lfile
|
(if lfile
|
||||||
(concat (string-remove-suffix ".el" lfile)
|
(concat (let ((suffix ".el"))
|
||||||
|
(if (string-suffix-p suffix lfile)
|
||||||
|
(substring lfile 0 (- (length lfile) (length suffix)))
|
||||||
|
lfile))
|
||||||
".%d.elc")
|
".%d.elc")
|
||||||
"profiles/load.%d.elc"))
|
"profiles/load.%d.elc"))
|
||||||
emacs-major-version)
|
emacs-major-version)
|
||||||
|
Reference in New Issue
Block a user