mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
Rename image transform commands to be less confusing
* lisp/image-mode.el (image-transform-original): Rename from this... (image-transform-reset-to-original): ...to this. Make old name into an obsolete function alias and update all callers. (image-transform-reset): Rename from this... (image-transform-reset-to-initial): ...to this. Make old name into an obsolete function alias and update all callers. (Bug#51451) * doc/emacs/files.texi (Image Mode): Update for above change.
This commit is contained in:
parent
600bb2d45f
commit
37fe0cd358
@ -2272,16 +2272,16 @@ behavior by using the options @code{image-auto-resize} and
|
||||
@findex image-transform-fit-to-window
|
||||
@findex image-transform-set-percent
|
||||
@findex image-transform-set-scale
|
||||
@findex image-transform-reset
|
||||
@findex image-transform-reset-to-initial
|
||||
To resize the image manually you can use the command
|
||||
@code{image-transform-fit-to-window} bound to @kbd{s w} that fits the
|
||||
image to both the window height and width. To scale the image to a
|
||||
percentage of its original size, use the command
|
||||
@code{image-transform-set-percent} bound to @kbd{s p}. To scale
|
||||
the image specifying a scale factor, use the command
|
||||
@code{image-transform-set-percent} bound to @kbd{s p}. To scale the
|
||||
image specifying a scale factor, use the command
|
||||
@code{image-transform-set-scale} bound to @kbd{s s}. To reset all
|
||||
transformations to the initial state, use @code{image-transform-reset}
|
||||
bound to @kbd{s 0}.
|
||||
transformations to the initial state, use
|
||||
@code{image-transform-reset-to-initial} bound to @kbd{s 0}.
|
||||
|
||||
@findex image-next-file
|
||||
@findex image-previous-file
|
||||
|
8
etc/NEWS
8
etc/NEWS
@ -1988,6 +1988,14 @@ These commands horizontally and vertically flip the image under point.
|
||||
It allows setting the image size to a percentage of its original size,
|
||||
and is bound to "s p" in Image mode.
|
||||
|
||||
+++
|
||||
*** 'image-transform-original' renamed to 'image-transform-reset-to-original'.
|
||||
The old name was confusing, and is now an obsolete function alias.
|
||||
|
||||
+++
|
||||
*** 'image-transform-reset' renamed to 'image-transform-reset-to-initial'.
|
||||
The old name was confusing, and is now an obsolete function alias.
|
||||
|
||||
** Images
|
||||
|
||||
+++
|
||||
|
@ -499,8 +499,8 @@ image as text, when opening such images in `image-mode'."
|
||||
"s s" #'image-transform-set-scale
|
||||
"s r" #'image-transform-set-rotation
|
||||
"s m" #'image-transform-set-smoothing
|
||||
"s o" #'image-transform-original
|
||||
"s 0" #'image-transform-reset
|
||||
"s o" #'image-transform-reset-to-original
|
||||
"s 0" #'image-transform-reset-to-initial
|
||||
|
||||
;; Multi-frame keys
|
||||
"RET" #'image-toggle-animation
|
||||
@ -571,9 +571,9 @@ image as text, when opening such images in `image-mode'."
|
||||
:help "Set rotation angle of the image"]
|
||||
["Set Smoothing..." image-transform-set-smoothing
|
||||
:help "Toggle smoothing"]
|
||||
["Original Size" image-transform-original
|
||||
["Original Size" image-transform-reset-to-original
|
||||
:help "Reset image to actual size"]
|
||||
["Reset to Default Size" image-transform-reset
|
||||
["Reset to Default Size" image-transform-reset-to-initial
|
||||
:help "Reset all image transformations to initial size"]
|
||||
"--"
|
||||
["Show Thumbnails"
|
||||
@ -1608,14 +1608,14 @@ ROTATION should be in degrees."
|
||||
(setq image--transform-smoothing smoothing)
|
||||
(image-toggle-display-image))
|
||||
|
||||
(defun image-transform-original ()
|
||||
(defun image-transform-reset-to-original ()
|
||||
"Display the current image with the original (actual) size and rotation."
|
||||
(interactive nil image-mode)
|
||||
(setq image-transform-resize nil
|
||||
image-transform-scale 1)
|
||||
(image-toggle-display-image))
|
||||
|
||||
(defun image-transform-reset ()
|
||||
(defun image-transform-reset-to-initial ()
|
||||
"Display the current image with the default (initial) size and rotation."
|
||||
(interactive nil image-mode)
|
||||
(setq image-transform-resize image-auto-resize
|
||||
@ -1624,6 +1624,9 @@ ROTATION should be in degrees."
|
||||
image--transform-smoothing nil)
|
||||
(image-toggle-display-image))
|
||||
|
||||
(define-obsolete-function-alias 'image-transform-original #'image-transform-reset-to-original "29.1")
|
||||
(define-obsolete-function-alias 'image-transform-reset #'image-transform-reset-to-initial "29.1")
|
||||
|
||||
(provide 'image-mode)
|
||||
|
||||
;;; image-mode.el ends here
|
||||
|
@ -1508,14 +1508,14 @@ Dired."
|
||||
|
||||
(defun image-dired-display-current-image-full ()
|
||||
"Display current image in full size."
|
||||
(declare (obsolete image-transform-original "29.1"))
|
||||
(declare (obsolete image-transform-reset-to-original "29.1"))
|
||||
(interactive nil image-dired-thumbnail-mode)
|
||||
(let ((file (image-dired-original-file-name)))
|
||||
(if file
|
||||
(progn
|
||||
(image-dired-display-image file)
|
||||
(with-current-buffer image-dired-display-image-buffer
|
||||
(image-transform-original)))
|
||||
(image-transform-reset-to-original)))
|
||||
(error "No original file name at point"))))
|
||||
|
||||
(defun image-dired-display-current-image-sized ()
|
||||
|
Loading…
Reference in New Issue
Block a user