From d99abf1ba0a389e17b22f2289d07337eaee0bab6 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Mon, 3 Dec 2007 07:24:34 +0000 Subject: [PATCH] (doc-view-initiate-display): Use `doc-view-mode-p'. (doc-view-current-overlay, doc-view-pending-cache-flush): Add doc string. --- lisp/ChangeLog | 6 ++++++ lisp/doc-view.el | 16 ++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2745a811c29..c381247b9b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-12-03 Tassilo Horn + + * doc-view.el (doc-view-initiate-display): Use `doc-view-mode-p'. + (doc-view-current-overlay, doc-view-pending-cache-flush): Add doc + string. + 2007-12-03 Richard Stallman * subr.el (declare-function): Moved from byte-run.el. diff --git a/lisp/doc-view.el b/lisp/doc-view.el index d0515fffe70..0e336b12dd5 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -234,8 +234,12 @@ has finished." (defvar doc-view-current-image nil "Only used internally.") -(defvar doc-view-current-overlay) -(defvar doc-view-pending-cache-flush nil) + +(defvar doc-view-current-overlay nil + "Only used internally.") + +(defvar doc-view-pending-cache-flush nil + "Only used internally.") (defvar doc-view-current-info nil "Only used internally.") @@ -887,8 +891,7 @@ If BACKWARD is non-nil, jump to the previous match." (defun doc-view-initiate-display () ;; Switch to image display if possible - (if (and (display-images-p) - (image-type-available-p 'png)) + (if (doc-view-mode-p (intern (file-name-extension buffer-file-name))) (progn (doc-view-buffer-message) (setq doc-view-current-page (or doc-view-current-page 1)) @@ -905,8 +908,9 @@ If BACKWARD is non-nil, jump to the previous match." (message "%s" (substitute-command-keys - (concat "No image (png) support available. Type \\[doc-view-toggle-display] " - "to switch to an editing mode."))))) + (concat "No image (png) support available or some conversion utility for " + (file-name-extension buffer-file-name)" files is missing. " + "Type \\[doc-view-toggle-display] to switch to an editing mode."))))) ;;;###autoload (defun doc-view-mode () -- 2.39.2