Subject: iimage mode patch

From: Döring, Arne Frederic Maria<[email-masked]>
Date: Fri, 7 Jul 2017 17:58:48 +0000

`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.
From b4d51491c6498851f1664d3e5ac7094320f31093 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arne=20D=C3=B6ring?= <[email-masked]>
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