all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: =?UTF-8?Q?D=C3=B6ring@debbugs.gnu.org, "?= Arne Frederic Maria" <arne.doering@rwth-aachen.de>
To: 27610@debbugs.gnu.org
Subject: bug#27610: iimage mode patch
Date: Fri, 7 Jul 2017 17:58:48 +0000	[thread overview]
Message-ID: <1499450328447.12324@rwth-aachen.de> (raw)


[-- 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


             reply	other threads:[~2017-07-07 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 17:58 =?UTF-8?Q?D=C3=B6ring, ?= Arne Frederic Maria [this message]
2019-06-24 16:25 ` bug#27610: iimage mode patch Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499450328447.12324@rwth-aachen.de \
    --to==?utf-8?q?d=c3=b6ring@debbugs.gnu.org \
    --cc=27610@debbugs.gnu.org \
    --cc=arne.doering@rwth-aachen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.