all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58800: Mark previous-buffer and next-buffer commands as repeatable
@ 2022-10-26 15:14 Damien Cassou
  2022-10-26 19:52 ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Damien Cassou @ 2022-10-26 15:14 UTC (permalink / raw)
  To: 58800

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

Tags: patch





In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure
 --prefix=/nix/store/1ihp8r45mw29fdipjmqrm2vk0fvwd86x-emacs-28.2
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo --with-native-compilation'


-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Mark-previous-buffer-and-next-buffer-commands-as-rep.patch --]
[-- Type: text/patch, Size: 1212 bytes --]

From 4bafbad18a0a027207399cf4ba71b7775eb873cb Mon Sep 17 00:00:00 2001
From: Damien Cassou <damien@cassou.me>
Date: Wed, 26 Oct 2022 17:12:14 +0200
Subject: [PATCH] Mark `previous-buffer' and `next-buffer' commands as
 repeatable

* lisp/bindings.el (buffer-navigation-repeat-map): Add new map.
* lisp/bindings.el (previous-buffer):
(next-buffer): Mark as repeatable.

Copyright-paperwork-exempt: yes
---
 lisp/bindings.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/bindings.el b/lisp/bindings.el
index 2e32128274..9005b20a71 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1029,6 +1029,14 @@ ctl-x-map
 (define-key global-map [XF86Back] 'previous-buffer)
 (put 'previous-buffer :advertised-binding [?\C-x left])
 
+(defvar-keymap buffer-navigation-repeat-map
+  :doc "Keymap to repeat `next-buffer' and `previous-buffer'.  Used in `repeat-mode'."
+  [right] #'next-buffer
+  [left] #'previous-buffer)
+
+(put 'next-buffer 'repeat-map 'buffer-navigation-repeat-map)
+(put 'previous-buffer 'repeat-map 'buffer-navigation-repeat-map)
+
 (let ((map minibuffer-local-map))
   (define-key map "\en"   'next-history-element)
   (define-key map [next]  'next-history-element)
-- 
2.36.2


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

end of thread, other threads:[~2022-10-30 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 15:14 bug#58800: Mark previous-buffer and next-buffer commands as repeatable Damien Cassou
2022-10-26 19:52 ` Stefan Kangas
2022-10-30  6:35   ` Damien Cassou
2022-10-30 13:25     ` Stefan Kangas

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.