fix: file-name-handler-alist ignoring user changes
Unsetting file-name-handler-alist around a `load` call prevents any change to this variable from surviving that file's evaluation (e.g. by packages loaded therein). Since the user's config files are loaded with this macro, this affects users' configs, which is unacceptable. Since this optimization is already done in early-init.el, we can get away with being more selective here.
This commit is contained in:
parent
1d8c61698b
commit
b763c5b992
1 changed files with 3 additions and 3 deletions
|
@ -569,11 +569,11 @@ If NOERROR is non-nil, don't throw an error if the file doesn't exist."
|
|||
(error "Could not detect path to look for '%s' in"
|
||||
filename)))
|
||||
(file (if path
|
||||
`(expand-file-name ,filename ,path)
|
||||
`(let (file-name-handler-alist)
|
||||
(expand-file-name ,filename ,path))
|
||||
filename)))
|
||||
`(condition-case-unless-debug e
|
||||
(let (file-name-handler-alist)
|
||||
(load ,file ,noerror 'nomessage))
|
||||
(load ,file ,noerror 'nomessage)
|
||||
(doom-error (signal (car e) (cdr e)))
|
||||
(error (doom--handle-load-error e ,file ,path)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue