Warn user to sync+rebuild on emacs' major version change
Byte-code is not generally compatible across major releases of Emacs, and packages may have changed in that time. Best throw a more helpful error than leave users to deal with the obscure errors that this can cause.
This commit is contained in:
parent
2ccb9cc8a3
commit
2c70b75c6c
2 changed files with 18 additions and 8 deletions
|
@ -101,6 +101,8 @@ Return t on success, nil otherwise (but logs a warning)."
|
|||
;; `string-remove-suffix' is much cheaper (because it does no file sanity
|
||||
;; checks during or after; just plain ol' string manipulation).
|
||||
(load (string-remove-suffix ".el" file) noerror 'nomessage)
|
||||
(doom-error
|
||||
(signal (car e) (cdr e)))
|
||||
((debug error)
|
||||
(message "Autoload file error: %s -> %s" (file-name-nondirectory file) e)
|
||||
nil)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue