diff options
| author | Juri Linkov | 2020-04-21 02:42:16 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-04-21 02:42:16 +0300 |
| commit | a64da75961fbce7dc071af37058de710bb13c26e (patch) | |
| tree | d9fb5d483a42b00bd56b8b9abf4d79b6a37d1a41 /doc | |
| parent | 692ad40539805e435a16b90067fa5917e4fea9f8 (diff) | |
| download | emacs-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.texi | 18 |
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, | |||
| 2122 | and displaying its underlying text (or raw byte) representation. | 2122 | and displaying its underlying text (or raw byte) representation. |
| 2123 | Additionally you can type @kbd{C-c C-x} (@code{image-toggle-hex-display}) | 2123 | Additionally you can type @kbd{C-c C-x} (@code{image-toggle-hex-display}) |
| 2124 | to toggle between displaying the file as an image in the Emacs buffer, | 2124 | to toggle between displaying the file as an image in the Emacs buffer, |
| 2125 | and displaying it in hex representation. | 2125 | and displaying it in hex representation. Displaying the file as an |
| 2126 | Displaying the file as an image works only if Emacs is compiled with | 2126 | image works only if Emacs is compiled with support for displaying |
| 2127 | support for displaying such images. If the displayed image is wider | 2127 | such images. |
| 2128 | or 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 | 2129 | If the displayed image is wider or taller than the frame, the usual |
| 2130 | displayed. You can press @kbd{n} (@code{image-next-file}) and @kbd{p} | 2130 | point motion keys (@kbd{C-f}, @kbd{C-p}, and so forth) cause different |
| 2131 | parts of the image to be displayed. But by default the image is | ||
| 2132 | resized automatically to fit to the window. You can configure this by | ||
| 2133 | using two options @code{image-auto-resize} and | ||
| 2134 | @code{image-auto-resize-on-window-resize}. | ||
| 2135 | |||
| 2136 | You 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 |
| 2132 | previous image file in the same directory, respectively. | 2138 | previous image file in the same directory, respectively. |
| 2133 | 2139 | ||