1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

* lisp/image-mode.el (image-transform-original): New command (bug#41222).

(image-mode-map): Bind it to "so" and add to menu.
This commit is contained in:
Juri Linkov 2020-06-08 03:30:27 +03:00
parent 6eb18a950d
commit c43e5ed60d

View File

@ -456,6 +456,7 @@ call."
(define-key map "sb" 'image-transform-fit-both)
(define-key map "ss" 'image-transform-set-scale)
(define-key map "sr" 'image-transform-set-rotation)
(define-key map "so" 'image-transform-original)
(define-key map "s0" 'image-transform-reset)
;; Multi-frame keys
@ -521,8 +522,10 @@ call."
:help "Rotate the image"]
["Set Rotation..." image-transform-set-rotation
:help "Set rotation angle of the image"]
["Reset Transformations" image-transform-reset
:help "Reset all image transformations"]
["Original Size" image-transform-original
:help "Reset image to actual size"]
["Reset to Default Size" image-transform-reset
:help "Reset all image transformations to initial size"]
"--"
["Show Thumbnails"
(lambda ()
@ -1382,8 +1385,15 @@ ROTATION should be in degrees."
(setq image-transform-rotation (float (mod rotation 360)))
(image-toggle-display-image))
(defun image-transform-original ()
"Display the current image with the original (actual) size and rotation."
(interactive)
(setq image-transform-resize nil
image-transform-scale 1)
(image-toggle-display-image))
(defun image-transform-reset ()
"Display the current image with the default size and rotation."
"Display the current image with the default (initial) size and rotation."
(interactive)
(setq image-transform-resize image-auto-resize
image-transform-rotation 0.0