Change envvar coding system buffer locally
This commit is contained in:
parent
21fda9af60
commit
a2011232a2
2 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in
|
||||||
doom-env-file)))
|
doom-env-file)))
|
||||||
(when (or force-p (not (file-exists-p env-file)))
|
(when (or force-p (not (file-exists-p env-file)))
|
||||||
(with-temp-file env-file
|
(with-temp-file env-file
|
||||||
(setq coding-system-for-write 'utf-8)
|
(setq-local coding-system-for-write 'utf-8)
|
||||||
(print! (start "%s envvars file at %S")
|
(print! (start "%s envvars file at %S")
|
||||||
(if (file-exists-p env-file)
|
(if (file-exists-p env-file)
|
||||||
"Regenerating"
|
"Regenerating"
|
||||||
|
|
|
@ -118,7 +118,7 @@ unreadable. Returns the names of envvars that were changed."
|
||||||
(env
|
(env
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(setq coding-system-for-read 'utf-8)
|
(setq-local coding-system-for-read 'utf-8)
|
||||||
(insert "\0\n") ; to prevent off-by-one
|
(insert "\0\n") ; to prevent off-by-one
|
||||||
(insert-file-contents file))
|
(insert-file-contents file))
|
||||||
(save-match-data
|
(save-match-data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue