emacs-devel
[Top][All Lists]
Advanced

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

Re: setenv's broken case when value is nil


From: Noah Friedman
Subject: Re: setenv's broken case when value is nil
Date: Wed, 17 Feb 2010 18:02:16 -0800 (PST)

>address@hidden changed env.el on 2007-08-29 to define setenv-internal and
>for setenv always to keep the variable name in process-environment, even if
>value is nil.  In other words, he removed the distinction between the empty
>string and nil, and therefore you can't remove variables from the
>environment using setenv anymore.
>
>Since all kinds of environment variables have meaning when they are
>defined, even if they are just set to the empty string, this is a screw.

My proposed change is this simple:

--- /export/src/emacs/build/2010-02-03--06-16-34--99438/lisp/env.el.~1~ 
2010-02-17 18:00:41.968005373 -0800
+++ /export/src/emacs/build/2010-02-03--06-16-34--99438/lisp/env.el 2010-02-17 
18:00:41.968005373 -0800
@@ -178,7 +178,7 @@
   (if (string-equal "TZ" variable)
       (set-time-zone-rule value))
   (setq process-environment (setenv-internal process-environment
-                                             variable value t))
+                                             variable value))
   value)
 
 (defun getenv (variable &optional frame)




reply via email to

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