diff options
| author | Tassilo Horn | 2008-03-16 09:24:29 +0000 |
|---|---|---|
| committer | Tassilo Horn | 2008-03-16 09:24:29 +0000 |
| commit | 7edd6b92deefa9e64ae0b5183ca121425b7e5f44 (patch) | |
| tree | 20f1dbffe80cc0497c287a48bca17222b7f87a01 | |
| parent | 2ecb26c3d2ab0ebd60327a7b3455202fd9c9b54f (diff) | |
| download | emacs-7edd6b92deefa9e64ae0b5183ca121425b7e5f44.tar.gz emacs-7edd6b92deefa9e64ae0b5183ca121425b7e5f44.zip | |
(doc-view-doc->txt, doc-view-convert-current-doc):
Use non-nil PARENTS attribute of make-directory instead of
explicitly checking existence the current cache directory.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/doc-view.el | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a94a2a387f1..1c4070fc14b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-03-16 Tassilo Horn <tassilo@member.fsf.org> | ||
| 2 | |||
| 3 | * doc-view.el (doc-view-doc->txt, doc-view-convert-current-doc): | ||
| 4 | Use non-nil PARENTS attribute of make-directory instead of | ||
| 5 | explicitly checking existence the current cache directory. | ||
| 6 | |||
| 1 | 2008-03-16 Daiki Ueno <ueno@unixuser.org> | 7 | 2008-03-16 Daiki Ueno <ueno@unixuser.org> |
| 2 | 8 | ||
| 3 | * epa-file.el (epa-file-select-keys): Fix bug with C-x C-s after | 9 | * epa-file.el (epa-file-select-keys): Fix bug with C-x C-s after |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 8c5fad4c3f0..156ca8c29c9 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -600,8 +600,7 @@ Should be invoked when the cached images aren't up-to-date." | |||
| 600 | 600 | ||
| 601 | (defun doc-view-doc->txt (txt callback) | 601 | (defun doc-view-doc->txt (txt callback) |
| 602 | "Convert the current document to text and call CALLBACK when done." | 602 | "Convert the current document to text and call CALLBACK when done." |
| 603 | (unless (file-exists-p (doc-view-current-cache-dir)) | 603 | (make-directory (doc-view-current-cache-dir) t) |
| 604 | (make-directory (doc-view-current-cache-dir))) | ||
| 605 | (case doc-view-doc-type | 604 | (case doc-view-doc-type |
| 606 | 605 | ||
| 607 | ;; Doc is a PDF, so convert it to TXT | 606 | ;; Doc is a PDF, so convert it to TXT |
| @@ -650,8 +649,7 @@ Those files are saved in the directory given by the function | |||
| 650 | (setq doc-view-pending-cache-flush t) | 649 | (setq doc-view-pending-cache-flush t) |
| 651 | (let ((png-file (expand-file-name "page-%d.png" | 650 | (let ((png-file (expand-file-name "page-%d.png" |
| 652 | (doc-view-current-cache-dir)))) | 651 | (doc-view-current-cache-dir)))) |
| 653 | (unless (file-exists-p (doc-view-current-cache-dir)) | 652 | (make-directory (doc-view-current-cache-dir) t) |
| 654 | (make-directory (doc-view-current-cache-dir))) | ||
| 655 | (case doc-view-doc-type | 653 | (case doc-view-doc-type |
| 656 | (dvi | 654 | (dvi |
| 657 | ;; DVI files have to be converted to PDF before Ghostscript can process | 655 | ;; DVI files have to be converted to PDF before Ghostscript can process |