Refactor autoloads init & error handling

Also reduces byte-compiled forms in the backtrace of a
doom-autoload-error.
This commit is contained in:
Henrik Lissner 2018-06-19 17:19:11 +02:00
parent 279ee3cc8c
commit 0fefc43d39
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 17 additions and 11 deletions

View file

@ -46,15 +46,6 @@ non-nil."
((debug error)
(signal 'doom-private-error (list 'init e)))))))
(defun doom-initialize-autoloads (file)
"Tries to load FILE (an autoloads file). Return t on success, nil otherwise."
(condition-case e
(load (file-name-sans-extension file) 'noerror 'nomessage)
((debug error)
(if noninteractive
(message "Autoload file warning: %s -> %s" (car e) (error-message-string e))
(signal 'doom-autoload-error e)))))
;;
;; Module API