summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 9330de1a600..f34c0f5dc49 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -296,7 +296,9 @@ Switch to a buffer visiting file FILENAME, creating one in none exists."
(list
(let ((completion-ignored-extensions nil))
(read-file-name "Filename: " nil nil 'ret-must-match))))
- (find-file-literally filename)
+ ;; Ignore the user's setting of default-major-mode.
+ (let ((default-major-mode 'hexl-mode))
+ (find-file-literally filename))
(if (not (eq major-mode 'hexl-mode))
(hexl-mode)))