borg-activate: Extend load-path before loading autoloads
This changes `borg-activate` to extend `load-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 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](https://github.com/radian-software/el-patch) with borg. That package emits a `(require 'el-patch-stub)` into its autoloads file (see [`el-patch.el`](https://github.com/radian-software/el-patch/blob/92803e7ea6e07cd56667ed7ea0dfacfc1f37f6d9/el-patch.el#L818)). 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.
合并状态:未合并 关闭于 2024-02-05 2 条评论