Fix doom-load-envvars-file

A former regexp consumed the first letter of each environment variable's
name.
This commit is contained in:
Henrik Lissner 2019-09-06 14:11:55 -04:00
parent 29055ae6a3
commit 280a2407ab
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

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