Soften formatting rules for envvar files

doom-load-envvar-file would fail if there weren't two newlines
indicating "the start of the envvar list", or if envvars were commented
out/were padded with whitespace. These rules have been relaxed.
This commit is contained in:
Henrik Lissner 2019-09-05 13:03:43 -04:00
parent 975928193b
commit cbe05e6df4
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -424,8 +424,7 @@ in interactive sessions, nil otherwise (but logs a warning)."
(let (vars)
(with-temp-buffer
(insert-file-contents file)
(search-forward "\n\n")
(while (re-search-forward "\n\\([^= \n]+\\)=" nil t)
(while (re-search-forward "\n *[^#] *\\([^= \n]+\\)=" nil t)
(save-excursion
(let ((var (match-string 1))
(value (buffer-substring-no-properties