This changes borg-activate to extend load-path always and unconditionally before loading autoloads.
The current code only extends load-pathafter loading the autoloads, and it does that also in a bit of a redundant way. Once as part of the local activate function and then again outside as a fallback.
edit: Sorry, I just realize I didn't motivate this PR. I tried to load el-patch with borg. That package emits a (require 'el-patch-stub) into its autoloads file (see el-patch.el). This then fails when borg tries to load the autoloads file. While that may be unconventional (?), it still seems reasonable to me to assume that a package is in load-path before its autoload file is evaluated.
This changes
borg-activate
to extendload-path
always and unconditionally before loading autoloads.The current code only extends
load-path
after loading the autoloads, and it does that also in a bit of a redundant way. Once as part of the localactivate
function and then again outside as a fallback.edit: Sorry, I just realize I didn't motivate this PR. I tried to load el-patch with borg. That package emits a
(require 'el-patch-stub)
into its autoloads file (seeel-patch.el
). This then fails when borg tries to load the autoloads file. While that may be unconventional (?), it still seems reasonable to me to assume that a package is inload-path
before its autoload file is evaluated.