Function: image-mode-as-hex
image-mode-as-hex is an interactive and byte-compiled function defined
in image-mode.el.gz.
Signature
(image-mode-as-hex)
Documentation
Set current buffer's modes be hexl-mode major mode, plus image-minor-mode(var)/image-minor-mode(fun).
This will by default display an image file as hex. image-minor-mode(var)/image-minor-mode(fun)
provides the key sequence C-c C-x (image-toggle-hex-display) to switch back to image-mode to display
an image file's buffer as an image.
You can use image-mode-as-hex in auto-mode-alist when you want to
display image files as hex by default.
See commands image-mode and image-minor-mode(var)/image-minor-mode(fun) for more information
on these modes.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-mode-as-hex ()
"Set current buffer's modes be `hexl-mode' major mode, plus `image-minor-mode'.
This will by default display an image file as hex. `image-minor-mode'
provides the key sequence \\<image-mode-map>\\[image-toggle-hex-display] to \
switch back to `image-mode' to display
an image file's buffer as an image.
You can use `image-mode-as-hex' in `auto-mode-alist' when you want to
display image files as hex by default.
See commands `image-mode' and `image-minor-mode' for more information
on these modes."
(interactive)
(image-mode-to-text)
(hexl-mode)
(image-minor-mode 1)
(message (substitute-command-keys
"Type \\[image-toggle-display] or \
\\[image-toggle-hex-display] to view the image as an image")))