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 hexl-mode as major mode in combination with image minor mode.
A non-mage major mode found from auto-mode-alist or fundamental mode
displays an image file as hex. image-minor-mode(var)/image-minor-mode(fun) provides the key
C-c C-x (image-toggle-hex-display) to switch back to image-mode to display an image file as
the actual image.
You can use image-mode-as-hex in auto-mode-alist when you want to
display an image file as hex initially.
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 `hexl-mode' as major mode in combination with image minor mode.
A non-mage major mode found from `auto-mode-alist' or fundamental mode
displays an image file as hex. `image-minor-mode' provides the key
\\<image-mode-map>\\[image-toggle-hex-display] to switch back to `image-mode' \
to display an image file as
the actual image.
You can use `image-mode-as-hex' in `auto-mode-alist' when you want to
display an image file as hex initially.
See commands `image-mode' and `image-minor-mode' for more information
on these modes."
(interactive)
(image-mode-to-text)
(hexl-mode)
(message "%s" (substitute-command-keys
"Type \\[hexl-mode-exit] to view the image as an image")))