Function: hexl-find-file

hexl-find-file is an autoloaded, interactive and byte-compiled function defined in hexl.el.gz.

Signature

(hexl-find-file FILENAME)

Documentation

Edit file FILENAME as a binary file in hex dump format.

Switch to a buffer visiting file FILENAME, creating one if none exists, and edit the file in hexl-mode. The buffer's coding-system will be no-conversion, unlike if you visit it normally and then invoke hexl-mode.

Probably introduced at or before Emacs version 19.20.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/hexl.el.gz
;;;###autoload
(defun hexl-find-file (filename)
  "Edit file FILENAME as a binary file in hex dump format.
Switch to a buffer visiting file FILENAME, creating one if none exists,
and edit the file in `hexl-mode'.  The buffer's coding-system will be
no-conversion, unlike if you visit it normally and then invoke `hexl-mode'."
  (interactive
   (list
    (let ((completion-ignored-extensions nil))
      (read-file-name "Filename: " nil nil 'ret-must-match))))
  ;; Ignore the user's setting of default major-mode.
  (cl-letf (((default-value 'major-mode) 'fundamental-mode))
    (find-file-literally filename))
  (if (not (eq major-mode 'hexl-mode))
      (hexl-mode)))