Mercurial > emacs
changeset 102824:607b4f5da59c
(doc-view-mode): Don't give up if the file doesn't exist.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 02 Apr 2009 21:12:54 +0000 |
parents | 3b582fef386d |
children | 14923c394d62 |
files | lisp/ChangeLog lisp/doc-view.el |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <monnier@iro.umontreal.ca> + + * doc-view.el (doc-view-mode): Don't give up if the file doesn't exist. + 2009-04-02 Glenn Morris <rgm@gnu.org> * calendar/diary-lib.el (diary-cyclic): Check for +ve N.
--- 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))