Subject: bug#27610: iimage mode patch

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 24 Jun 2019 18:25:17 +0200

"Döring," Arne Frederic Maria <[email-masked]> 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