]> code.delx.au - gnu-emacs/commitdiff
2006-03-23 Reiner Steib <reinersteib+gmane@imap.cc>
authorSimon Josefsson <jas@extundo.com>
Thu, 23 Mar 2006 13:13:27 +0000 (13:13 +0000)
committerSimon Josefsson <jas@extundo.com>
Thu, 23 Mar 2006 13:13:27 +0000 (13:13 +0000)
* pgg-gpg.el (pgg-gpg-update-agent): Check for
make-network-process, so we can use the same code in Gnus v5-10
too and have this file fully synchronized with that release.

lisp/ChangeLog
lisp/pgg-gpg.el

index f0964ecb8259457917a05c0efd478634e4929398..0f02be03c86c62be37774e9d9e92bdc6e586f2e5 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-23  Reiner Steib  <reinersteib+gmane@imap.cc>
+
+       * pgg-gpg.el (pgg-gpg-update-agent): Check for
+       make-network-process, so we can use the same code in Gnus v5-10
+       too and have this file fully synchronized with that release.
+
 2006-03-23  Romain Francoise  <romain@orebokech.com>
 
        * ibuf-ext.el (ibuffer-read-filter-group-name):
index eefc569fd047f74ce718b32881a4d0a798509c0d..ab91471a619eb10d4aa3b39fbe5cd233f74fd956 100644 (file)
@@ -358,18 +358,21 @@ passphrase cache or user."
 
 (defun pgg-gpg-update-agent ()
   "Try to connet to gpg-agent and send UPDATESTARTUPTTY."
-  (let* ((agent-info (getenv "GPG_AGENT_INFO")) 
-        (socket (and agent-info
-                     (string-match "^\\([^:]*\\)" agent-info)
-                     (match-string 1 agent-info)))
-        (conn (and socket
-                   (make-network-process :name "gpg-agent-process"
-                                         :host 'local :family 'local
-                                         :service socket))))
-    (when (and conn (eq (process-status conn) 'open))
-      (process-send-string conn "UPDATESTARTUPTTY\n")
-      (delete-process conn)
-      t)))
+  (if (fboundp 'make-network-process)
+      (let* ((agent-info (getenv "GPG_AGENT_INFO"))
+            (socket (and agent-info
+                         (string-match "^\\([^:]*\\)" agent-info)
+                         (match-string 1 agent-info)))
+            (conn (and socket
+                       (make-network-process :name "gpg-agent-process"
+                                             :host 'local :family 'local
+                                             :service socket))))
+       (when (and conn (eq (process-status conn) 'open))
+         (process-send-string conn "UPDATESTARTUPTTY\n")
+         (delete-process conn)
+         t))
+    ;; We can't check, so assume gpg-agent is up.
+    t))
 
 (defun pgg-gpg-use-agent-p ()
   "Return t if `pgg-gpg-use-agent' is t and gpg-agent is available."