unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
@ 2020-04-28  0:26 Amin Bandali
  2020-04-28 17:02 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Amin Bandali @ 2020-04-28  0:26 UTC (permalink / raw)
  To: 40916


[-- Attachment #1.1: Type: text/plain, Size: 572 bytes --]

Hello,

The following binds "p" to backward-button, and "n" to forward-button in
help-mode-map for more conveniently jumping between buttons in *Help*
buffers.  I have found myself constantly reaching for these in *Help*
buffers after using helpful [0] for a while.

[0]: https://github.com/Wilfred/helpful

I thought about adding these to button-map itself, but that seemed like
a more invasive change, and I wasn't sure about its side effects e.g. in
non-read-only buffers.

The patch is against emacs-27, since it's a trivial and hopefully
completely harmless change.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Add-p-and-n-convenience-bindings-to-help-mode-map.patch --]
[-- Type: text/x-diff, Size: 1039 bytes --]

From efcca34ed0cab882318e2654dd667e31f6d32511 Mon Sep 17 00:00:00 2001
From: Amin Bandali <bandali@gnu.org>
Date: Mon, 27 Apr 2020 20:06:55 -0400
Subject: [PATCH] Add "p" and "n" convenience bindings to help-mode-map

* lisp/help-mode.el (help-mode-map): Bind "p" to backward-button, and
"n" to forward-button for more conveniently jumping between buttons in
*Help* buffers.
---
 lisp/help-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index bae8281147..0f8380255e 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -37,6 +37,8 @@ help-mode-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map (make-composed-keymap button-buffer-map
                                                  special-mode-map))
+    (define-key map "p" 'backward-button)
+    (define-key map "n" 'forward-button)
     (define-key map [mouse-2] 'help-follow-mouse)
     (define-key map "l" 'help-go-back)
     (define-key map "r" 'help-go-forward)
-- 
2.25.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-08 12:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28  0:26 bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map Amin Bandali
2020-04-28 17:02 ` Drew Adams
2020-04-29  5:23   ` Amin Bandali
2020-04-28 17:33 ` Stefan Kangas
2020-04-29  5:15   ` Amin Bandali
2020-05-01  0:36     ` Stefan Kangas
2020-08-08 12:08 ` 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).