# HG changeset patch # User Reiner Steib # Date 1196666674 0 # Node ID a15ce3ca213a5445107c0c072fd04c26384df8a9 # Parent ce6a9097341e4eceb07e0e096a1462018e14bd88 (doc-view-initiate-display): Use `doc-view-mode-p'. (doc-view-current-overlay, doc-view-pending-cache-flush): Add doc string. diff -r ce6a9097341e -r a15ce3ca213a lisp/ChangeLog --- a/lisp/ChangeLog Mon Dec 03 06:54:20 2007 +0000 +++ b/lisp/ChangeLog Mon Dec 03 07:24:34 2007 +0000 @@ -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 -r ce6a9097341e -r a15ce3ca213a lisp/doc-view.el --- a/lisp/doc-view.el Mon Dec 03 06:54:20 2007 +0000 +++ b/lisp/doc-view.el Mon Dec 03 07:24:34 2007 +0000 @@ -234,8 +234,12 @@ (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 @@ (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 @@ (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 ()