]> git.eshelyaron.com Git - emacs.git/commitdiff
* epg.el (epg--start): Modify process-environment locally.
authorAndreas Schwab <schwab@linux-m68k.org>
Fri, 28 Dec 2012 09:49:59 +0000 (10:49 +0100)
committerAndreas Schwab <schwab@linux-m68k.org>
Fri, 28 Dec 2012 09:49:59 +0000 (10:49 +0100)
lisp/ChangeLog
lisp/epg.el

index c4d884a50102c3e5b5e4ea3fefeb2a62e468bf50..e13ce397beec200210717eb32eb50a8ea542951e 100644 (file)
@@ -1,3 +1,7 @@
+2012-12-28  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * epg.el (epg--start): Modify process-environment locally.
+
 2012-12-28  Daiki Ueno  <ueno@gnu.org>
 
        * epg.el: Support pinentry-curses.
index 5fb8f809aa957aba53df4bf9f242cc73f11c34cc..a1bc25e1c440ee06711dca29e02c0b265aca63fc 100644 (file)
@@ -1156,6 +1156,7 @@ This function is for internal use only."
         (coding-system-for-write 'binary)
         (coding-system-for-read 'binary)
         process-connection-type
+        (process-environment process-environment)
         (orig-mode (default-file-modes))
         (buffer (generate-new-buffer " *epg*"))
         process
@@ -1170,8 +1171,9 @@ This function is for internal use only."
        (delete-backward-char 1)
        (setq terminal-name (buffer-string))))
     (when terminal-name
-      (setenv "GPG_TTY" terminal-name)
-      (setenv "TERM" "xterm"))
+      (setq process-environment
+           (cons (concat "GPG_TTY=" terminal-name)
+                 (cons "TERM=xterm" process-environment))))
     ;; Record modified time of gpg-agent socket to restore the Emacs
     ;; frame on text terminal in `epg-wait-for-completion'.
     ;; See