Keep backup of errant autoloads files
This commit is contained in:
parent
d6706734a2
commit
2e92f8d8a8
1 changed files with 4 additions and 5 deletions
|
@ -342,16 +342,15 @@ it exists."
|
||||||
(defun doom--byte-compile-file (file)
|
(defun doom--byte-compile-file (file)
|
||||||
(let ((short-name (file-name-nondirectory file))
|
(let ((short-name (file-name-nondirectory file))
|
||||||
(byte-compile-dynamic-docstrings t))
|
(byte-compile-dynamic-docstrings t))
|
||||||
(condition-case-unless-debug ex
|
(condition-case e
|
||||||
(when (byte-compile-file file)
|
(when (byte-compile-file file)
|
||||||
(load (byte-compile-dest-file file) nil t)
|
(load (byte-compile-dest-file file) nil t)
|
||||||
(unless noninteractive
|
(unless noninteractive
|
||||||
(message "Finished compiling %s" short-name)))
|
(message "Finished compiling %s" short-name)))
|
||||||
('error
|
((debug error)
|
||||||
|
(copy-file file (concat file ".bk") 'overwrite)
|
||||||
(doom-delete-autoloads-file file)
|
(doom-delete-autoloads-file file)
|
||||||
(error "Error in %s: %s -- %s"
|
(signal 'doom-autoload-error (list short-name e))))))
|
||||||
short-name
|
|
||||||
(car ex) (error-message-string ex))))))
|
|
||||||
|
|
||||||
(defun doom-reload-autoloads (&optional file force-p)
|
(defun doom-reload-autoloads (&optional file force-p)
|
||||||
"Reloads FILE (an autoload file), if it needs reloading.
|
"Reloads FILE (an autoload file), if it needs reloading.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue