summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2002-01-12 13:28:48 +0000
committerEli Zaretskii <eliz@gnu.org>2002-01-12 13:28:48 +0000
commitef59dd3bb89839f8480e2c5eb91edc6c55bebad8 (patch)
treed76e19bbd5926aec55d4e5eda1c2c2e8c3ede452 /lisp
parent95014d6265035d78e8ab6c18dcb7949f2b92d64c (diff)
downloademacs-ef59dd3bb89839f8480e2c5eb91edc6c55bebad8.tar.gz
(find-file-noselect): Don't consider a buffer as
visiting a file literally if it is in hexl-mode.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/files.el8
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c800bc49080..5da6e4816c9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2002-01-12 Eli Zaretskii <eliz@is.elta.co.il>
+ * files.el (find-file-noselect): Don't consider a buffer as
+ visiting a file literally if it is in hexl-mode.
+
* faces.el (minibuffer-prompt): A better face definition for MS-DOS.
2002-01-11 Richard M. Stallman <rms@gnu.org>
diff --git a/lisp/files.el b/lisp/files.el
index ff47462f9ca..8042707e137 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1078,8 +1078,12 @@ that are visiting the various files."
(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? "