summaryrefslogtreecommitdiff
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-08-18 19:21:32 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-08-18 19:21:32 +0200
commitf97668c38fe4b503d14200baa4fe9627c2cbcb1b (patch)
tree9e15e1dddd4efe0105c7c4dfeed95894927bbf31 /lisp/image-mode.el
parentf98276f77b4e2cbf37e4d24387d21b48e9fd6144 (diff)
parentef1e68f11d9c5a4c66fa3b28c116ed3038a56496 (diff)
downloademacs-f97668c38fe4b503d14200baa4fe9627c2cbcb1b.tar.gz
Merge from origin/emacs-28
ef1e68f11d * lisp/image-mode.el (image-mode-as-hex): Fix toggle instr... dc0fce3a7d ; lisp/image-mode.el: Fix typo. 254ba1d3e5 * lisp/image-mode.el: Improve commentary. ac43ac1af9 cl-reduce doc string improvement
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r--lisp/image-mode.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 46c555df278..76c076818f8 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -23,10 +23,14 @@
;;; Commentary:
-;; Defines a major mode for visiting image files
-;; that allows conversion between viewing the text of the file,
-;; hex of the file and viewing the file as an image. Viewing the image
-;; works by putting a `display' text-property on the
+;; Defines `image-mode', a major mode for visiting image files. Displaying
+;; images only works if Emacs was built with support for displaying
+;; such images. See Info node `(emacs) Image Mode' for more
+;; information.
+;;
+;; There is support for switching between viewing the text of the
+;; file, the hex of the file and viewing the file as an image.
+;; Viewing the image works by putting a `display' text-property on the
;; image data, with the image-data still present underneath; if the
;; resulting buffer file is saved to another name it will correctly save
;; the image data to the new file.
@@ -789,13 +793,9 @@ See commands `image-mode' and `image-minor-mode' for more information
on these modes."
(interactive)
(image-mode-to-text)
- ;; Turn on hexl-mode
(hexl-mode)
- (message (substitute-command-keys
- "Type \\[image-toggle-hex-display] or \
-\\[image-toggle-display] to view the image as %s")
- (if (image-get-display-property)
- "hex" "an image or text")))
+ (message "%s" (substitute-command-keys
+ "Type \\[hexl-mode-exit] to view the image as an image")))
(defun image-mode-as-text ()
"Set a non-image mode as major mode in combination with image minor mode.