image is already displayed. Add turning image-minor-mode off to
`change-major-mode-hook'. Add message.
Call `image-toggle-display-text' after turning image-minor-mode off.
autoload cookies. Associate .x[bp]m with `image-mode-maybe'
in `auto-mode-alist'.
(image-mode): Add `image-toggle-display-text' to local hook
`change-major-mode-hook'. Display the image as an image by
default. Set `cursor-type' and `truncate-lines' if the image
is already displayed. Take into account the current mode (image
or text) in message.
(image-minor-mode): New minor mode.
(image-mode-maybe, image-toggle-display-text): New functions.
(image-toggle-display): Use called-interactively-p.
Let-bind `inhibit-read-only' to t.