tweak(cli): read $DOOMPATH like $EMACSLOADPATH
$EMACSLOADPATH is read to pre-fill load-path. Empty entries therein are substituted with the default value of load-path. I am mirroring this behavior with the $DOOMPATH variable.
This commit is contained in:
parent
1a1e7b808b
commit
a29041735c
1 changed files with 9 additions and 3 deletions
|
@ -79,9 +79,15 @@
|
||||||
;;; Variables
|
;;; Variables
|
||||||
|
|
||||||
(defvar doom-cli-load-path
|
(defvar doom-cli-load-path
|
||||||
(append (ignore-errors (split-string (getenv "DOOMPATH") path-separator))
|
(let ((paths (split-string (or (getenv "DOOMPATH") "") path-separator)))
|
||||||
(list (doom-path (file-name-directory load-file-name) "cli")))
|
(if (member "" paths)
|
||||||
"A list of paths to search for autoloaded CLIs on.")
|
(cl-substitute (doom-path (dir!) "cli/") "" paths :test #'equal)
|
||||||
|
paths))
|
||||||
|
"A list of paths to search for autoloaded Doom CLIs.
|
||||||
|
|
||||||
|
It is prefilled by the DOOMPATH envvar (a colon-separated list on Linux/macOS,
|
||||||
|
semicolon otherwise). Empty entries in DOOMPATH are replaced with the
|
||||||
|
$EMACSDIR/cli/.")
|
||||||
|
|
||||||
(defvar doom-cli-argument-types
|
(defvar doom-cli-argument-types
|
||||||
'(&args
|
'(&args
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue