Function: image-mode-to-text
image-mode-to-text is an autoloaded and byte-compiled function defined
in image-mode.el.gz.
Signature
(image-mode-to-text)
Documentation
Set a non-image 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 text.
Source Code
;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
;;;###autoload
(defun image-mode-to-text ()
"Set a non-image 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 text."
;; image-mode-as-text = normal-mode + image-minor-mode
(let ((previous-image-type image-type)) ; preserve `image-type'
(major-mode-restore '(image-mode image-mode-as-text))
;; Restore `image-type' after `kill-all-local-variables' in `normal-mode'.
(setq image-type previous-image-type)
;; Enable image minor mode with `C-c C-c'.
(image-minor-mode 1)
(unless (image-get-display-property)
;; Show the image file as text.
(image-toggle-display-text))))