[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map
From: |
Amin Bandali |
Subject: |
bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map |
Date: |
Mon, 27 Apr 2020 20:26:33 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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.
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
signature.asc
Description: PGP signature
- bug#40916: [PATCH] Add "p" and "n" convenience bindings to help-mode-map,
Amin Bandali <=