Fix doom//reload-autoloads #328

`get-file-buffer` returns nil if no buffer for that file already exists.
In an edge case on Windows, `update-file-autoloads` doesn't leave
a hanging buffer, possibly ignoring its SAVE-AFTER argument. Using
`find-file-noselect` fixes this, which will open a buffer if one doesn't
already exist.
This commit is contained in:
Henrik Lissner 2018-01-05 13:37:05 -05:00
parent 55ad843a09
commit a568f95004
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -567,7 +567,7 @@ This should be run whenever init.el or an autoload file is modified. Running
"✓ Scanned %s"))
(file-relative-name file doom-emacs-dir)))
(make-directory (file-name-directory doom-autoload-file) t)
(let ((buf (get-file-buffer doom-autoload-file))
(let ((buf (find-file-noselect doom-autoload-file t))
current-sexp)
(unwind-protect
(condition-case-unless-debug ex