From 4bf1ac4172b32e3cbc8ecc29e2aad327b763870a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 13 Jan 2002 08:50:04 +0000 Subject: [PATCH] (find-file-noselect): Don't consider a buffer as visiting a file literally if it is in hexl-mode. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1691198ea92..9071ef02e4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-01-13 Eli Zaretskii + + * files.el (find-file-noselect): Don't consider a buffer as + visiting a file literally if it is in hexl-mode. + 2001-12-29 Richard M. Stallman * net/ange-ftp.el (ange-ftp-allow-child-lookup): Always return nil. diff --git a/lisp/files.el b/lisp/files.el index b7201bdd459..12ad644cf32 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1071,8 +1071,12 @@ that are visiting the various files." (with-current-buffer buf (revert-buffer t t))))) (with-current-buffer buf - (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? " -- 2.39.5