diff options
| author | Tassilo Horn | 2008-01-09 10:25:17 +0000 |
|---|---|---|
| committer | Tassilo Horn | 2008-01-09 10:25:17 +0000 |
| commit | 622face2db67129761aa128450c132aa48386a84 (patch) | |
| tree | 916338955b1fdda4050142dd5b2b1e6e03d5b26e | |
| parent | f5e070d6011dd2c4a7f187976f6a1f2d35cce743 (diff) | |
| download | emacs-622face2db67129761aa128450c132aa48386a84.tar.gz emacs-622face2db67129761aa128450c132aa48386a84.zip | |
2008-01-09 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-mode-p): Add EPS as supported type.
(doc-view-mode): Support document files inside archives.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/doc-view.el | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e72275e9010..b6f0a0f57bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-01-09 Tassilo Horn <tassilo@member.fsf.org> | ||
| 2 | |||
| 3 | * doc-view.el (doc-view-mode-p): Add EPS as supported type. | ||
| 4 | (doc-view-mode): Support document files inside archives. | ||
| 5 | |||
| 1 | 2008-01-09 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2008-01-09 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * vc.el (vc-deduce-fileset): Return the currently selected file if | 8 | * vc.el (vc-deduce-fileset): Return the currently selected file if |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 9c153dc584f..83f9be53ae3 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -476,7 +476,7 @@ Image types are symbols like `dvi', `postscript' or `pdf'." | |||
| 476 | (and (doc-view-mode-p 'pdf) | 476 | (and (doc-view-mode-p 'pdf) |
| 477 | doc-view-dvipdfm-program | 477 | doc-view-dvipdfm-program |
| 478 | (executable-find doc-view-dvipdfm-program))) | 478 | (executable-find doc-view-dvipdfm-program))) |
| 479 | ((or (eq type 'postscript) (eq type 'ps) | 479 | ((or (eq type 'postscript) (eq type 'ps) (eq type 'eps) |
| 480 | (eq type 'pdf)) | 480 | (eq type 'pdf)) |
| 481 | (and doc-view-ghostscript-program | 481 | (and doc-view-ghostscript-program |
| 482 | (executable-find doc-view-ghostscript-program))) | 482 | (executable-find doc-view-ghostscript-program))) |
| @@ -930,6 +930,7 @@ You can use \\<doc-view-mode-map>\\[doc-view-toggle-display] to | |||
| 930 | toggle between displaying the document or editing it as text." | 930 | toggle between displaying the document or editing it as text." |
| 931 | (interactive) | 931 | (interactive) |
| 932 | (if jka-compr-really-do-compress | 932 | (if jka-compr-really-do-compress |
| 933 | |||
| 933 | ;; This is a compressed file uncompressed by auto-compression-mode. | 934 | ;; This is a compressed file uncompressed by auto-compression-mode. |
| 934 | (when (y-or-n-p (concat "DocView: Cannot convert compressed file. " | 935 | (when (y-or-n-p (concat "DocView: Cannot convert compressed file. " |
| 935 | "Save it uncompressed first? ")) | 936 | "Save it uncompressed first? ")) |
| @@ -940,11 +941,21 @@ toggle between displaying the document or editing it as text." | |||
| 940 | (kill-buffer nil) | 941 | (kill-buffer nil) |
| 941 | (find-file file) | 942 | (find-file file) |
| 942 | (doc-view-mode))) | 943 | (doc-view-mode))) |
| 944 | |||
| 945 | ;; When opening a pdf/ps/dvi that's inside an archive (tar, zip, ...) the | ||
| 946 | ;; file buffer-file-name doesn't exist, so create the directory and save | ||
| 947 | ;; the file. | ||
| 948 | (when (not (file-exists-p (file-name-directory buffer-file-name))) | ||
| 949 | (dired-create-directory (file-name-directory buffer-file-name))) | ||
| 950 | (when (not (file-exists-p buffer-file-name)) | ||
| 951 | (write-file buffer-file-name)) | ||
| 952 | |||
| 943 | (let* ((prev-major-mode (if (eq major-mode 'doc-view-mode) | 953 | (let* ((prev-major-mode (if (eq major-mode 'doc-view-mode) |
| 944 | doc-view-previous-major-mode | 954 | doc-view-previous-major-mode |
| 945 | major-mode))) | 955 | major-mode))) |
| 946 | (kill-all-local-variables) | 956 | (kill-all-local-variables) |
| 947 | (set (make-local-variable 'doc-view-previous-major-mode) prev-major-mode)) | 957 | (set (make-local-variable 'doc-view-previous-major-mode) prev-major-mode)) |
| 958 | |||
| 948 | (make-local-variable 'doc-view-current-files) | 959 | (make-local-variable 'doc-view-current-files) |
| 949 | (make-local-variable 'doc-view-current-image) | 960 | (make-local-variable 'doc-view-current-image) |
| 950 | (make-local-variable 'doc-view-current-page) | 961 | (make-local-variable 'doc-view-current-page) |