# HG changeset patch # User Stefan Monnier # Date 1238706774 0 # Node ID 607b4f5da59c8b3495aa4f7eb9141f7808a941f0 # Parent 3b582fef386d159542b943a3e97201291e1aec29 (doc-view-mode): Don't give up if the file doesn't exist. diff -r 3b582fef386d -r 607b4f5da59c lisp/ChangeLog --- a/lisp/ChangeLog Thu Apr 02 19:43:27 2009 +0000 +++ b/lisp/ChangeLog Thu Apr 02 21:12:54 2009 +0000 @@ -1,3 +1,7 @@ +2009-04-02 Stefan Monnier + + * doc-view.el (doc-view-mode): Don't give up if the file doesn't exist. + 2009-04-02 Glenn Morris * calendar/diary-lib.el (diary-cyclic): Check for +ve N. diff -r 3b582fef386d -r 607b4f5da59c lisp/doc-view.el --- a/lisp/doc-view.el Thu Apr 02 19:43:27 2009 +0000 +++ b/lisp/doc-view.el Thu Apr 02 21:12:54 2009 +0000 @@ -1121,10 +1121,10 @@ \\{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))