Commit 9e6adaec authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Allow resetting image transform options

* image-mode.el (image-transform-reset): New command and menu item.
(image-mode-map): Rearrange the menu items to put presumably more
obscure items at the end.
parent bd4de70f
2014-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image-mode.el (image-transform-reset): New command and menu item.
(image-mode-map): Rearrange the menu items to put presumably more
obscure items at the end.
2014-08-12 Juri Linkov <juri@jurta.org>
 
* vc/vc-annotate.el (vc-annotate-background-mode):
......
......@@ -379,8 +379,6 @@ call."
["Show as Text" image-toggle-display :active t
:help "Show image as text"]
"--"
["Fit Frame to Image" image-mode-fit-frame :active t
:help "Resize frame to match image"]
["Fit to Window Height" image-transform-fit-to-height
:visible (eq image-type 'imagemagick)
:help "Resize image to match the window height"]
......@@ -390,6 +388,9 @@ call."
["Rotate Image..." image-transform-set-rotation
:visible (eq image-type 'imagemagick)
:help "Rotate the image"]
["Reset Transformations" image-transform-reset
:visible (eq image-type 'imagemagick)
:help "Reset all image transformations"]
"--"
["Show Thumbnails"
(lambda ()
......@@ -402,6 +403,9 @@ call."
["Previous Image" image-previous-file :active buffer-file-name
:help "Move to previous image in this directory"]
"--"
["Fit Frame to Image" image-mode-fit-frame :active t
:help "Resize frame to match image"]
"--"
["Animate Image" image-toggle-animation :style toggle
:selected (let ((image (image-get-display-property)))
(and image (image-animate-timer image)))
......@@ -1097,6 +1101,16 @@ Emacs is compiled with ImageMagick support."
(setq image-transform-rotation (float (mod rotation 360)))
(image-toggle-display-image))
(defun image-transform-reset ()
"Display the current image with the default size and rotation.
This command has no effect unless Emacs is compiled with
ImageMagick support."
(interactive)
(setq image-transform-resize nil
image-transform-rotation 0.0
image-transform-scale 1)
(image-toggle-display-image))
(provide 'image-mode)
;;; image-mode.el ends here
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