[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setenv and let-binding process-environment

From: Wolfgang Jenkner
Subject: Re: setenv and let-binding process-environment
Date: Sun, 20 Mar 2016 15:10:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (berkeley-unix)

On Sun, Mar 20 2016, Michael Heerdegen wrote:

>   (let ((process-environment process-environment))
>     (setenv "A" "2"))

This just establishes a new binding to the same object, so the code
works as expected.

The following would give the desired result (but, as you said, consing
the new value to the beginning of process-environment is better).

(let ((process-environment (copy-sequence process-environment)))
  (setenv "A" "2"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]