diff --git a/core/core.el b/core/core.el index 293462cb3..b488e48a1 100644 --- a/core/core.el +++ b/core/core.el @@ -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)