changeset 42672:e6ab8b412ffc

(find-file-noselect): Don't consider a buffer as visiting a file literally if it is in hexl-mode.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 12 Jan 2002 13:27:13 +0000
parents 3cc44ee4b8cd
children b8fccbdef14b
files lisp/files.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sat Jan 12 12:18:11 2002 +0000
+++ b/lisp/files.el	Sat Jan 12 13:27:13 2002 +0000
@@ -1078,8 +1078,12 @@
 		      (setq buffer-read-only read-only)))
 		  (setq buffer-file-read-only read-only))
 
-		(when (not (eq (not (null rawfile))
-			       (not (null find-file-literally))))
+		(when (and (not (eq (not (null rawfile))
+				    (not (null find-file-literally))))
+			   ;; It is confusing to ask whether to visit
+			   ;; non-literally if they have the file in
+			   ;; hexl-mode.
+			   (not (eq major-mode 'hexl-mode)))
 		  (if (buffer-modified-p)
 		      (if (y-or-n-p (if rawfile
 					"Save file and revisit literally? "