Function: doc-view-mode-maybe

doc-view-mode-maybe is an autoloaded and byte-compiled function defined in doc-view.el.gz.

Signature

(doc-view-mode-maybe)

Documentation

Switch to doc-view-mode if possible.

If the required external tools are not available, then fallback to the next best mode.

Source Code

;; Defined in /usr/src/emacs/lisp/doc-view.el.gz
;;;###autoload
(defun doc-view-mode-maybe ()
  "Switch to `doc-view-mode' if possible.
If the required external tools are not available, then fallback
to the next best mode."
  (condition-case nil
      (doc-view-set-doc-type)
    (error (doc-view-fallback-mode)))
  (if (doc-view-mode-p doc-view-doc-type)
      (doc-view-mode)
    (doc-view-fallback-mode)))