aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/eww.el3
3 files changed, 9 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 9d204cfe8ad..bb749e87501 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -210,6 +210,8 @@ xml.el/libxml2 DOM, and a new package dom.el has been added to
210interact with this DOM. See the Emacs Lisp manual for interface 210interact with this DOM. See the Emacs Lisp manual for interface
211details. 211details.
212 212
213*** `mailcap-mime-data' is now consulted when displaying PDF files.
214
213** Message mode 215** Message mode
214 216
215*** text/html messages that contain inline image parts will be 217*** text/html messages that contain inline image parts will be
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 26572c3649f..2fc3562ac5a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-12-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/eww.el (eww-display-pdf): Let mailcap determine how to
4 display PDF files (bug#19270).
5
12014-12-05 Juri Linkov <juri@linkov.net> 62014-12-05 Juri Linkov <juri@linkov.net>
2 7
3 Compare with the most recent window by default. 8 Compare with the most recent window by default.
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 73abd26d8c5..e88afb50326 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -493,6 +493,7 @@ See the `eww-search-prefix' variable for the search engine used."
493 (shr-put-image data nil)) 493 (shr-put-image data nil))
494 (goto-char (point-min))))) 494 (goto-char (point-min)))))
495 495
496(declare-function mailcap-view-mime "mailcap" (type))
496(defun eww-display-pdf () 497(defun eww-display-pdf ()
497 (let ((data (buffer-substring (point) (point-max)))) 498 (let ((data (buffer-substring (point) (point-max))))
498 (switch-to-buffer (get-buffer-create "*eww pdf*")) 499 (switch-to-buffer (get-buffer-create "*eww pdf*"))
@@ -500,7 +501,7 @@ See the `eww-search-prefix' variable for the search engine used."
500 (inhibit-read-only t)) 501 (inhibit-read-only t))
501 (erase-buffer) 502 (erase-buffer)
502 (insert data) 503 (insert data)
503 (doc-view-mode))) 504 (mailcap-view-mime "application/pdf")))
504 (goto-char (point-min))) 505 (goto-char (point-min)))
505 506
506(defun eww-setup-buffer () 507(defun eww-setup-buffer ()