Skip to content

Commit

Permalink
tweak(core): minor edit in +env-save
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jul 18, 2023
1 parent bc25440 commit 9f2c175
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions elisp/+minemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ If N and M = 1, there's no benefit to using this macro over `remove-hook'.
(string-lines (shell-command-to-string "env") "="))))
;; Special treatment for the "PATH" variable, save it to `exec-path'
(when-let ((path (alist-get "PATH" env-vars nil nil #'string=)))
(insert
(format "\n;; Adding PATH content to `exec-path'\n(setq exec-path (delete-dups (append exec-path '%s)))\n\n"
(mapcar (lambda (s) (concat "\"" s "\"")) (parse-colon-path path)))))
(insert "\n;; Adding PATH content to `exec-path'\n"
(format "(setq exec-path (delete-dups (append exec-path '%s)))\n\n"
(mapcar (lambda (s) (concat "\"" s "\"")) (parse-colon-path path)))))
;; Save the environment variables to `process-environment' using `setenv'
(insert ";; Adding the rest of the environment variables\n")
(dolist (env-var env-vars)
Expand Down

0 comments on commit 9f2c175

Please sign in to comment.