* nnmail.el (nnmail-cache-insert): make sure that the
[gnus] / lisp / mailcap.el
index 53ec822..e38adcb 100644 (file)
     (modify-syntax-entry ?{ "(" table)
     (modify-syntax-entry ?} ")" table)
     table)
-  "A syntax table for parsing sgml attributes.")
+  "A syntax table for parsing SGML attributes.")
+
+(eval-and-compile
+  (when (featurep 'xemacs)
+    (condition-case nil
+       (require 'lpr)
+      (error nil))))
 
 (defvar mailcap-print-command
   (mapconcat 'identity
-            (cons lpr-command
-                  (if (stringp lpr-switches)
-                      (list lpr-switches)
-                    lpr-switches))
+            (cons (if (boundp 'lpr-command)
+                      lpr-command
+                    "lpr")
+                  (when (boundp 'lpr-switches)
+                    (if (stringp lpr-switches)
+                        (list lpr-switches)
+                      lpr-switches)))
             " ")
   "Shell command (including switches) used to print Postscript files.")
 
                          mailcap-print-command))
       (test . window-system))
      ("pdf"
-      (viewer . ,(concat "pdftotext %s - | "))
+      (viewer . ,(concat "pdftotext %s -"))
       (type   . "application/pdf")
       ("print" . ,(concat "pdftops %s - | " mailcap-print-command))
       ("copiousoutput"))
      ("sieve"
       (viewer . sieve-mode)
       (test   . (fboundp 'sieve-mode))
-      (type   . "application/sieve")))
+      (type   . "application/sieve"))
+     ("pgp-keys"
+      (viewer . "gpg --import --interactive --verbose")
+      (type   . "application/pgp-keys")
+      ("needsterminal")))
     ("audio"
      ("x-mpeg"
       (viewer . "maplay %s")
@@ -614,7 +627,7 @@ Also return non-nil if no test clause is present."
 
 (defun mailcap-viewer-passes-test (viewer-info type-info)
   "Return non-nil iff viewer specified by VIEWER-INFO passes its test clause.
-Also retun non-nil if it has no test clause.  TYPE-INFO is an argument
+Also return non-nil if it has no test clause.  TYPE-INFO is an argument
 to supply to the test."
   (let* ((test-info (assq 'test viewer-info))
         (test (cdr test-info))