* bug#27610: iimage mode patch
@ 2017-07-07 17:58 =?UTF-8?Q?D=C3=B6ring, ?= Arne Frederic Maria
2019-06-24 16:25 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: =?UTF-8?Q?D=C3=B6ring, ?= Arne Frederic Maria @ 2017-07-07 17:58 UTC (permalink / raw)
To: 27610
[-- Attachment #1.1: Type: text/plain, Size: 208 bytes --]
`iimage-mode' binds C-l to `iimage-recenter' and this forwards to `recenter'. But the default function on C-l is `recenter-top-bottom', not `recenter'. I made iimage mode call `recenter-top-bottom' instead.
[-- Attachment #1.2: Type: text/html, Size: 560 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-made-iimage-mode-not-break-default-binding-of-C-l.patch --]
[-- Type: text/x-patch; name="0001-made-iimage-mode-not-break-default-binding-of-C-l.patch", Size: 1157 bytes --]
From b4d51491c6498851f1664d3e5ac7094320f31093 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arne=20D=C3=B6ring?= <arne.doering@gmx.net>
Date: Fri, 7 Jul 2017 19:54:32 +0200
Subject: [PATCH] made iimage mode not break default binding of C-l
---
lisp/iimage.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/iimage.el b/lisp/iimage.el
index abb88ec502..a15e02984e 100644
--- a/lisp/iimage.el
+++ b/lisp/iimage.el
@@ -81,7 +81,7 @@ Examples of image filename patterns to match:
(defvar iimage-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "\C-l" 'iimage-recenter)
+ (define-key map "\C-l" 'iimage-recenter-top-bottom)
map)
"Keymap used in `iimage-mode'.")
@@ -92,6 +92,13 @@ Examples of image filename patterns to match:
(iimage-mode-buffer t)
(recenter arg))
+(defun iimage-recenter-top-bottom (&optional arg)
+ "Re-draw images and call `recenter-top-bottom' with ARG."
+ (interactive "P")
+ (iimage-mode-buffer nil)
+ (iimage-mode-buffer t)
+ (recenter-top-bottom arg))
+
;;;###autoload
(define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1")
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#27610: iimage mode patch
2017-07-07 17:58 bug#27610: iimage mode patch =?UTF-8?Q?D=C3=B6ring, ?= Arne Frederic Maria
@ 2019-06-24 16:25 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-24 16:25 UTC (permalink / raw)
To: =?UTF-8?Q?D=C3=B6ring, ?= Arne Frederic Maria; +Cc: 27610
"Döring," Arne Frederic Maria <arne.doering@rwth-aachen.de> writes:
> `iimage-mode' binds C-l to `iimage-recenter' and this forwards to `recenter'.
> But the default function on C-l is `recenter-top-bottom', not `recenter'. I
> made iimage mode call `recenter-top-bottom' instead.
Makes sense to call that function instead, yes. But:
> (defvar iimage-mode-map
> (let ((map (make-sparse-keymap)))
> - (define-key map "\C-l" 'iimage-recenter)
> + (define-key map "\C-l" 'iimage-recenter-top-bottom)
> map)
> "Keymap used in `iimage-mode'.")
[...]
> +(defun iimage-recenter-top-bottom (&optional arg)
> + "Re-draw images and call `recenter-top-bottom' with ARG."
> + (interactive "P")
> + (iimage-mode-buffer nil)
> + (iimage-mode-buffer t)
> + (recenter-top-bottom arg))
I don't think this is necessary -- instead iimage-recenter should just
call recenter-top-bottom. I've now made this change on the Emacs trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-24 16:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-07 17:58 bug#27610: iimage mode patch =?UTF-8?Q?D=C3=B6ring, ?= Arne Frederic Maria
2019-06-24 16:25 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).