diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-04-02 21:12:54 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-04-02 21:12:54 +0000 |
commit | 96fe38a86776bba63590abf82602252ec473853e (patch) | |
tree | e31be52a56f0fd27965346f8ce0adfa9d8a49fb9 /lisp/doc-view.el | |
parent | 6133a1a9b7444f082a62f2acd92df1dc15ee6829 (diff) | |
download | emacs-96fe38a86776bba63590abf82602252ec473853e.tar.gz |
(doc-view-mode): Don't give up if the file doesn't exist.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r-- | lisp/doc-view.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index aca2f65d0f6..ce6a7fd0ba9 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1121,10 +1121,10 @@ toggle between displaying the document or editing it as text. \\{doc-view-mode-map}" (interactive) - (if (or (not (file-exists-p buffer-file-name)) - (= (point-min) (point-max))) + (if (= (point-min) (point-max)) ;; The doc is empty or doesn't exist at all, so fallback to - ;; another mode. + ;; another mode. We used to also check file-exists-p, but this + ;; returns nil for tar members. (let ((auto-mode-alist (remq (rassq 'doc-view-mode auto-mode-alist) auto-mode-alist))) (normal-mode)) |