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:
parent
5c3b820335
commit
f55131f745
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue