Closed phil-s closed 9 years ago
I agree with this.
I tried it with
(eval-after-load 'image+ (lambda () (local-set-key (kbd "=") 'image-sticky-zoom-in)))
(eval-after-load 'image+ (lambda () (local-set-key (kbd "C-=") 'image-sticky-zoom-in)))
(eval-after-load 'image+ (lambda () (local-set-key (kbd "-") 'image-sticky-zoom-out)))
(eval-after-load 'image+ (lambda () (local-set-key (kbd "m") 'image-sticky-maximize)))
(eval-after-load 'image+ (lambda () (local-set-key (kbd "o") 'imagex-sticky-restore-original)))
Without any succes. Another suggestion?
Well your code defines a bunch of functions and does nothing with them. I think you wanted this:
(eval-after-load 'image+
'(progn
(define-key image-mode-map (kbd "=") 'image-sticky-zoom-in)
(define-key image-mode-map (kbd "C-=") 'image-sticky-zoom-in)
(define-key image-mode-map (kbd "-") 'image-sticky-zoom-out)
(define-key image-mode-map (kbd "m") 'image-sticky-maximize)
(define-key image-mode-map (kbd "o") 'imagex-sticky-restore-original)))
Well, thanks for your addition but it didn't worked either. :frowning:.
Sorry, I wasn't paying enough attention to what was in your functions. I've changed my code to use define-key
with the appropriate keymap.
It's my pleasure for your such request.
But image-mode
already has the similar functions (e.g. image-transform-set-rotation, image-transform-set-scale), if Emacs was compiled with imagemagick option.
In addition, I don't want this implementation as a default.
MELPA is a great idea to install miscellaneous handy elisp package. :smiley:
@ReneFroger If you still have problem, please open a new issue.
This is nice, and it would be even nicer if it were in Emacs by default.
image-mode
already has bindingsn
andp
to move between images. Having additional direct bindingsl
,r
,+
,-
, andm
for your functionality would be a natural enhancement.