bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#2259: 23.0.90; PATCH: getenv mistakenly passes a frame to getenv_int


From: Juanma Barranquero
Subject: bug#2259: 23.0.90; PATCH: getenv mistakenly passes a frame to getenv_internal, when it should instead pass a CONS
Date: Tue, 10 Feb 2009 17:10:20 +0100

On Tue, Feb 10, 2009 at 11:24, Juanma Barranquero <address@hidden> wrote:

> or it
> is known at that point that the ENV arg of `server-with-environment'
> will never contain negative entries (i.e., can the output of
> (process-get process 'env) contain negative entries)? If it is
> intended, perhaps a comment would be in order.

OK, I see now that "ENV should be in the same format as
`process-environment'", and that, in `process-environment', "[e]ach
element should be a string of the form ENVVARNAME=VALUE". So yes, it
is known that there shouldn't be negative entries, and it is even
documented.

Still, perhaps this change would be useful...

    Juanma


Index: server.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/server.el,v
retrieving revision 1.188
diff -u -2 -r1.188 server.el
--- server.el   7 Feb 2009 21:59:35 -0000       1.188
+++ server.el   10 Feb 2009 15:55:04 -0000
@@ -241,7 +241,7 @@
        (dolist (,var ,vars)
          (let ((,value (getenv-internal ,var ,env)))
-           (push (if (null ,value)
-                     ,var
-                   (concat ,var "=" ,value))
+           (push (if (stringp ,value)
+                     (concat ,var "=" ,value)
+                   ,var)
                  process-environment)))
        (progn ,@body))))






reply via email to

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