Only add doom-private-dir to load-path during autoload generation,
otherwise a $DOOMDIR/autoload.el will shadow the built-in autoload.el
Emacs package.

Note: with `doom-private-dir' in `load-path', Doom autoloads files will
be unable to declare autoloads for the built-in autoload.el Emacs
package, should $DOOMDIR/autoload.el exist. Not sure why they'd want to
though, so it's an acceptable compromise for simpler autoload
declarations.
This commit is contained in:
Henrik Lissner 2018-09-14 09:35:00 -04:00
parent c37e3a1b80
commit a9fdeefe15
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 8 additions and 3 deletions

View file

@ -121,7 +121,14 @@ even if it doesn't need reloading!"
(abbreviate-file-name file))))))
(defun doom--expand-autoloads ()
(let ((load-path (append doom-modules-dirs load-path))
(let ((load-path
;; NOTE With `doom-private-dir' in `load-path', Doom autoloads files
;; will be unable to declare autoloads for the built-in autoload.el
;; Emacs package, should $DOOMDIR/autoload.el exist. Not sure why
;; they'd want to though, so it's an acceptable compromise.
(append (list doom-private-dir)
doom-modules-dirs
load-path))
cache)
(while (re-search-forward "^\\s-*(autoload\\s-+'[^ ]+\\s-+\"\\([^\"]*\\)\"" nil t)
(let ((path (match-string 1)))

View file

@ -466,8 +466,6 @@ in interactive sessions, nil otherwise (but logs a warning)."
(unless noninteractive
(doom-initialize-modules))
(add-to-list 'load-path doom-private-dir)
(after! package
(require 'core-packages))