diff options
| author | Elias Pipping | 2013-01-10 10:50:04 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-01-10 10:50:04 -0500 |
| commit | 72781fefa6c91b51e44e7faed4b8792fbd65f345 (patch) | |
| tree | 027773bfb2de039e24aa39291afd19160c04eff9 | |
| parent | e6ed8f08460d9bc9af7109c5a8619b3d1d407bdf (diff) | |
| download | emacs-72781fefa6c91b51e44e7faed4b8792fbd65f345.tar.gz emacs-72781fefa6c91b51e44e7faed4b8792fbd65f345.zip | |
* lisp/files.el (auto-mode-alist): Use doc-view for djvu files.
* lisp/doc-view.el (doc-view-document->bitmap):
Use doc-view-single-page-converter-function instead of
single-page-converter arg; adjust callers.
Fixes: debbugs:13164
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/doc-view.el | 7 | ||||
| -rw-r--r-- | lisp/files.el | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f74abc427af..da239252f7e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-01-10 Elias Pipping <pipping@exherbo.org> | ||
| 2 | |||
| 3 | * files.el (auto-mode-alist): Use doc-view for djvu files (bug#13164). | ||
| 4 | * doc-view.el (doc-view-document->bitmap): | ||
| 5 | Use doc-view-single-page-converter-function instead of | ||
| 6 | single-page-converter arg; adjust callers. | ||
| 7 | |||
| 1 | 2013-01-10 Feng Li <fengli@gmail.com> (tiny change) | 8 | 2013-01-10 Feng Li <fengli@gmail.com> (tiny change) |
| 2 | 9 | ||
| 3 | * progmodes/which-func.el (which-function): Understand Semantic's use | 10 | * progmodes/which-func.el (which-function): Understand Semantic's use |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 9748a5f5f72..fa54eef828d 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -942,7 +942,7 @@ is named like ODF with the extension turned to pdf." | |||
| 942 | 942 | ||
| 943 | (declare-function clear-image-cache "image.c" (&optional filter)) | 943 | (declare-function clear-image-cache "image.c" (&optional filter)) |
| 944 | 944 | ||
| 945 | (defun doc-view-document->bitmap (pdf png pages single-page-converter) | 945 | (defun doc-view-document->bitmap (pdf png pages) |
| 946 | "Convert a document file to bitmap images asynchronously. | 946 | "Convert a document file to bitmap images asynchronously. |
| 947 | Start by converting PAGES, and then the rest." | 947 | Start by converting PAGES, and then the rest." |
| 948 | (if (null pages) | 948 | (if (null pages) |
| @@ -952,7 +952,7 @@ Start by converting PAGES, and then the rest." | |||
| 952 | ;; a single page anyway, and of the remaining 1%, few cases will have | 952 | ;; a single page anyway, and of the remaining 1%, few cases will have |
| 953 | ;; consecutive pages, it's not worth the trouble. | 953 | ;; consecutive pages, it's not worth the trouble. |
| 954 | (let ((rest (cdr pages))) | 954 | (let ((rest (cdr pages))) |
| 955 | (funcall single-page-converter | 955 | (funcall doc-view-single-page-converter-function |
| 956 | pdf (format png (car pages)) (car pages) | 956 | pdf (format png (car pages)) (car pages) |
| 957 | (lambda () | 957 | (lambda () |
| 958 | (if rest | 958 | (if rest |
| @@ -1066,8 +1066,7 @@ Those files are saved in the directory given by the function | |||
| 1066 | ((or `pdf `djvu) | 1066 | ((or `pdf `djvu) |
| 1067 | (let ((pages (doc-view-active-pages))) | 1067 | (let ((pages (doc-view-active-pages))) |
| 1068 | ;; Convert doc to bitmap images starting with the active pages. | 1068 | ;; Convert doc to bitmap images starting with the active pages. |
| 1069 | (doc-view-document->bitmap doc-view-buffer-file-name png-file pages | 1069 | (doc-view-document->bitmap doc-view-buffer-file-name png-file pages))) |
| 1070 | doc-view-single-page-converter-function))) | ||
| 1071 | (_ | 1070 | (_ |
| 1072 | ;; Convert to PNG images. | 1071 | ;; Convert to PNG images. |
| 1073 | (doc-view-pdf/ps->png doc-view-buffer-file-name png-file))))) | 1072 | (doc-view-pdf/ps->png doc-view-buffer-file-name png-file))))) |
diff --git a/lisp/files.el b/lisp/files.el index ca5a415fb8e..b015b53db3c 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2357,7 +2357,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) | |||
| 2357 | ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode) | 2357 | ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode) |
| 2358 | ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG | 2358 | ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG |
| 2359 | ("\\.[eE]?[pP][sS]\\'" . ps-mode) | 2359 | ("\\.[eE]?[pP][sS]\\'" . ps-mode) |
| 2360 | ("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe) | 2360 | ("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|djvu\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe) |
| 2361 | ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode) | 2361 | ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode) |
| 2362 | ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode) | 2362 | ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode) |
| 2363 | ("BROWSE\\'" . ebrowse-tree-mode) | 2363 | ("BROWSE\\'" . ebrowse-tree-mode) |