* pgg.el (pgg-insert-url-with-w3): Ignore errors.
authorSimon Josefsson <jas@extundo.com>
Wed, 9 Oct 2002 22:33:14 +0000 (22:33 +0000)
committerSimon Josefsson <jas@extundo.com>
Wed, 9 Oct 2002 22:33:14 +0000 (22:33 +0000)
(pgg-fetch-key-function): Nil if w3 is not installed.

lisp/ChangeLog
lisp/pgg.el

index 5e8a133..39748b1 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-09  Simon Josefsson  <jas@extundo.com>
+
+       * pgg.el (pgg-insert-url-with-w3): Ignore errors.
+       (pgg-fetch-key-function): Nil if w3 is not installed.
+
 2002-10-08  Kai Gro\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * gnus-agent.el (gnus-agent-fetch-selected-article): Bind
index 54b106a..861cb94 100644 (file)
@@ -45,7 +45,8 @@
 ;;; @ utility functions
 ;;;
 
-(defvar pgg-fetch-key-function (function pgg-fetch-key-with-w3))
+(defvar pgg-fetch-key-function (if (fboundp 'url-insert-file-contents)
+                                  function pgg-fetch-key-with-w3))
 
 (defun pgg-invoke (func scheme &rest args)
   (progn
@@ -255,10 +256,11 @@ signer's public key from `pgg-default-keyserver-address'."
 (defvar pgg-insert-url-function  (function pgg-insert-url-with-w3))
 
 (defun pgg-insert-url-with-w3 (url)
-  (require 'w3)
-  (require 'url)
-  (let (buffer-file-name)
-    (url-insert-file-contents url)))
+  (ignore-errors
+    (require 'w3)
+    (require 'url)
+    (let (buffer-file-name)
+      (url-insert-file-contents url))))
 
 (defvar pgg-insert-url-extra-arguments nil)
 (defvar pgg-insert-url-program nil)