[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15466: 24.3.50; [PATCH] Add some keybindings for doc-view-mode
From: |
Tassilo Horn |
Subject: |
bug#15466: 24.3.50; [PATCH] Add some keybindings for doc-view-mode |
Date: |
Thu, 26 Sep 2013 20:38:00 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> (define-key map (kbd "RET") 'image-next-line)
>> ;; Zoom in/out.
>> (define-key map "+" 'doc-view-enlarge)
>> + (define-key map "=" 'doc-view-enlarge)
>> + (define-key map (kbd "C-x C-+") 'doc-view-enlarge)
>> + (define-key map (kbd "C-x C-=") 'doc-view-enlarge)
>> (define-key map "-" 'doc-view-shrink)
>> + (define-key map (kbd "C-x C--") 'doc-view-shrink)
>> ;; Fit the image to the window
>> (define-key map "W" 'doc-view-fit-width-to-window)
>> (define-key map "H" 'doc-view-fit-height-to-window)
>
> I think it's OK (unless Tassilo disagrees, obviously),
No, it's fine with me.
> Also, maybe instead of rebinding C-x C-+, we should remap
> text-scale-adjust.
Yeah
(define-key map [remap text-scale-adjust] 'doc-view-enlarge)
(define-key map (kbd "C-x C--") 'doc-view-shrink)
should be equivalent. Well, except that C-x C-0 would also enlarge. It
wouldn't be bad to have a command to reset to the original size. That
shouldn't be hard to do. In the non-ImageMagick case, it's killing the
buffer-local value of doc-view-resolution and reconverting, and in the
ImageMagick case it's just killing the local value of
doc-view-image-width and re-inserting the image with
doc-view-insert-image.
Bye,
Tassilo