aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJuri Linkov2020-04-21 02:42:16 +0300
committerJuri Linkov2020-04-21 02:42:16 +0300
commita64da75961fbce7dc071af37058de710bb13c26e (patch)
treed9fb5d483a42b00bd56b8b9abf4d79b6a37d1a41 /doc
parent692ad40539805e435a16b90067fa5917e4fea9f8 (diff)
downloademacs-a64da75961fbce7dc071af37058de710bb13c26e.tar.gz
emacs-a64da75961fbce7dc071af37058de710bb13c26e.zip
Add image-auto-resize defcustoms to image-mode.el
* lisp/image-mode.el (image-auto-resize) (image-auto-resize-on-window-resize): New defcustoms. (image-mode-map): Bind "sb" to image-transform-fit-both. (image-mode): Set image-transform-resize to image-auto-resize initially. (image-mode--setup-mode): Add hook on image-auto-resize-on-window-resize. (image-toggle-display-image): Check if image-transform-resize is t. (image-transform-properties): Check image-transform-resize for nil and t. (image-transform-fit-both): New command. (image-transform-reset): Reset image-transform-resize to image-auto-resize. * doc/emacs/files.texi (Image Mode): Mention image-auto-resize and image-auto-resize-on-window-resize. https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01160.html
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/files.texi18
1 files changed, 12 insertions, 6 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 7d57555ce33..8d75b569edb 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -2122,12 +2122,18 @@ to toggle between displaying the file as an image in the Emacs buffer,
2122and displaying its underlying text (or raw byte) representation. 2122and displaying its underlying text (or raw byte) representation.
2123Additionally you can type @kbd{C-c C-x} (@code{image-toggle-hex-display}) 2123Additionally you can type @kbd{C-c C-x} (@code{image-toggle-hex-display})
2124to toggle between displaying the file as an image in the Emacs buffer, 2124to toggle between displaying the file as an image in the Emacs buffer,
2125and displaying it in hex representation. 2125and displaying it in hex representation. Displaying the file as an
2126Displaying the file as an image works only if Emacs is compiled with 2126image works only if Emacs is compiled with support for displaying
2127support for displaying such images. If the displayed image is wider 2127such images.
2128or taller than the frame, the usual point motion keys (@kbd{C-f}, 2128
2129@kbd{C-p}, and so forth) cause different parts of the image to be 2129If the displayed image is wider or taller than the frame, the usual
2130displayed. You can press @kbd{n} (@code{image-next-file}) and @kbd{p} 2130point motion keys (@kbd{C-f}, @kbd{C-p}, and so forth) cause different
2131parts of the image to be displayed. But by default the image is
2132resized automatically to fit to the window. You can configure this by
2133using two options @code{image-auto-resize} and
2134@code{image-auto-resize-on-window-resize}.
2135
2136You can press @kbd{n} (@code{image-next-file}) and @kbd{p}
2131(@code{image-previous-file}) to visit the next image file and the 2137(@code{image-previous-file}) to visit the next image file and the
2132previous image file in the same directory, respectively. 2138previous image file in the same directory, respectively.
2133 2139