From: Eli Zaretskii Date: Sat, 5 Mar 2011 08:48:52 +0000 (+0200) Subject: Fix bug #8177 with re-visiting image files. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~674^2~34 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ae59fff628e08b6e167ebdc4fd62e77048cec32;p=emacs.git Fix bug #8177 with re-visiting image files. files.el (find-file-noselect): Don't ask about re-visiting non-literally if the file is already visited in image-mode. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aeb7c8edff4..047d8bb5dcc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-05 Eli Zaretskii + + * files.el (find-file-noselect): Don't ask about re-visiting + non-literally if the file is already visited in image-mode. + (Bug#8177) + 2011-03-05 Glenn Morris * eshell/esh-mode.el (eshell-kill-buffer-function): New function. diff --git a/lisp/files.el b/lisp/files.el index a8f937233de..52ccbbf86dd 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1894,8 +1894,8 @@ the various files." (not nonexistent) ;; It is confusing to ask whether to visit ;; non-literally if they have the file in - ;; hexl-mode. - (not (eq major-mode 'hexl-mode))) + ;; hexl-mode or image-mode. + (not (memq major-mode '(hexl-mode image-mode)))) (if (buffer-modified-p) (if (y-or-n-p (format