Function: image-mode-as-text
image-mode-as-text is an interactive and byte-compiled function
defined in image-mode.el.gz.
Signature
(image-mode-as-text)
Documentation
Set a non-image mode as major mode in combination with image minor mode.
A non-image major mode found from auto-mode-alist or Fundamental mode
displays an image file as text. image-minor-mode(var)/image-minor-mode(fun) provides the key
C-c C-c (image-toggle-display) to switch back to image-mode
to display an image file as the actual image.
You can use image-mode-as-text in auto-mode-alist when you want
to display an image file as text initially.
See commands image-mode and image-minor-mode(var)/image-minor-mode(fun) for more information
on these modes.
Probably introduced at or before Emacs version 23.2.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defun image-mode-as-text ()
"Set a non-image mode as major mode in combination with image minor mode.
A non-image major mode found from `auto-mode-alist' or Fundamental mode
displays an image file as text. `image-minor-mode' provides the key
\\<image-mode-map>\\[image-toggle-display] to switch back to `image-mode'
to display an image file as the actual image.
You can use `image-mode-as-text' in `auto-mode-alist' when you want
to display an image file as text initially.
See commands `image-mode' and `image-minor-mode' for more information
on these modes."
(interactive)
(image-mode-to-text)
(image-minor-mode 1)
(message (substitute-command-keys
"Type \\[image-toggle-display] to view the image as %s")
(if (image-get-display-property)
"text" "an image")))