Commit c43e5ed6 authored by Juri Linkov's avatar Juri Linkov
Browse files

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

(image-mode-map): Bind it to "so" and add to menu.
parent 6eb18a95
Pipeline #5801 passed with stage
in 66 minutes and 8 seconds
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment