summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2009-04-02 21:12:54 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2009-04-02 21:12:54 +0000
commit96fe38a86776bba63590abf82602252ec473853e (patch)
treee31be52a56f0fd27965346f8ce0adfa9d8a49fb9 /lisp/doc-view.el
parent6133a1a9b7444f082a62f2acd92df1dc15ee6829 (diff)
downloademacs-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.el6
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))