aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno2013-01-05 07:51:52 +0900
committerDaiki Ueno2013-01-05 07:51:52 +0900
commit00cd4c1cbd961403ae8e07fca4ffdbc26f84f5db (patch)
tree4f62d2db0d62fa7f12e7b39849f638a553b5b6a0
parent0f668a4db4a33f98f84613513af3efea521b4847 (diff)
downloademacs-00cd4c1cbd961403ae8e07fca4ffdbc26f84f5db.tar.gz
emacs-00cd4c1cbd961403ae8e07fca4ffdbc26f84f5db.zip
* epg.el (epg--start): Don't call "tty" program on W32 platforms.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/epg.el13
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c34f256b955..60b25d5ff66 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-01-04 Daiki Ueno <ueno@gnu.org>
2
3 * epg.el (epg--start): Don't call "tty" program on W32 platforms.
4 Suggested by Eli Zaretskii <eliz@gnu.org>.
5
12013-01-04 Michael Albinus <michael.albinus@gmx.de> 62013-01-04 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * net/tramp-sh.el (tramp-set-file-uid-gid): UID and GID must be 8 * net/tramp-sh.el (tramp-set-file-uid-gid): UID and GID must be
diff --git a/lisp/epg.el b/lisp/epg.el
index ff32661ada9..01f7210c9a9 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1166,12 +1166,13 @@ This function is for internal use only."
1166 ;; Set GPG_TTY and TERM for pinentry-curses. Note that we can't 1166 ;; Set GPG_TTY and TERM for pinentry-curses. Note that we can't
1167 ;; use `terminal-name' here to get the real pty name for the child 1167 ;; use `terminal-name' here to get the real pty name for the child
1168 ;; process, though /dev/fd/0" is not portable. 1168 ;; process, though /dev/fd/0" is not portable.
1169 (with-temp-buffer 1169 (unless (memq system-type '(ms-dos windows-nt))
1170 (condition-case nil 1170 (with-temp-buffer
1171 (when (= (call-process "tty" "/dev/fd/0" t) 0) 1171 (condition-case nil
1172 (delete-backward-char 1) 1172 (when (= (call-process "tty" "/dev/fd/0" t) 0)
1173 (setq terminal-name (buffer-string))) 1173 (delete-backward-char 1)
1174 (file-error))) 1174 (setq terminal-name (buffer-string)))
1175 (file-error))))
1175 (when terminal-name 1176 (when terminal-name
1176 (setq process-environment 1177 (setq process-environment
1177 (cons (concat "GPG_TTY=" terminal-name) 1178 (cons (concat "GPG_TTY=" terminal-name)