+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):
(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."