Support PDF Tools for PDF viewing of attachments
authorTassilo Horn <tsdh@gnu.org>
Mon, 23 Feb 2015 09:19:00 +0000 (10:19 +0100)
committerTassilo Horn <tsdh@gnu.org>
Mon, 23 Feb 2015 09:19:00 +0000 (10:19 +0100)
* mailcap.el (mailcap-mime-data): Support `pdf-view-mode' (from PDF
Tools: https://github.com/politza/pdf-tools) for viewing PDF
attachments in emacs.

lisp/ChangeLog
lisp/mailcap.el

index b6a24f1..1a0a736 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-23  Tassilo Horn  <tsdh@gnu.org>
+
+       * mailcap.el (mailcap-mime-data): Support `pdf-view-mode' (from PDF
+       Tools: https://github.com/politza/pdf-tools) for viewing PDF
+       attachments in emacs.
+
 2015-02-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-mime-display-single): Avoid "End of buffer" error.
index 01d8587..9f84413 100644 (file)
@@ -152,6 +152,11 @@ This is a compatibility function for different Emacsen."
       (non-viewer . t)
       (type   . "application/zip")
       ("copiousoutput"))
+     ("pdf"
+      (viewer . pdf-view-mode)
+      (type . "application/pdf")
+      (test . (and (fboundp 'pdf-view-mode)
+                  (eq window-system 'x))))
      ("pdf"
       (viewer . doc-view-mode)
       (type . "application/pdf")