From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#58800: Mark previous-buffer and next-buffer commands as repeatable Date: Wed, 26 Oct 2022 17:14:51 +0200 Message-ID: <87v8o6zkes.fsf@cassou.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33264"; mail-complaints-to="usenet@ciao.gmane.io" To: 58800@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 26 17:20:38 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oniCs-0008Uy-LY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Oct 2022 17:20:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oni7W-0000GM-9O; Wed, 26 Oct 2022 11:15:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oni7T-0008Ve-Kw for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 11:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oni7T-0002GO-CD for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 11:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oni7S-0003o6-Mm for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 11:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2022 15:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166679730114607 (code B ref -1); Wed, 26 Oct 2022 15:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 15:15:01 +0000 Original-Received: from localhost ([127.0.0.1]:55078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oni7Q-0003nW-Op for submit@debbugs.gnu.org; Wed, 26 Oct 2022 11:15:01 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oni7O-0003nO-Gx for submit@debbugs.gnu.org; Wed, 26 Oct 2022 11:14:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oni7O-0008Bp-CW for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 11:14:58 -0400 Original-Received: from mail.choca.pics ([80.67.172.235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oni7M-0002B5-0p for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 11:14:58 -0400 Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 4C3D3181942C3 for ; Wed, 26 Oct 2022 17:14:53 +0200 (CEST) Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id n0dZ_zz2tAWn for ; Wed, 26 Oct 2022 17:14:52 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id ADA0F181942C4 for ; Wed, 26 Oct 2022 17:14:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id xqmGL6FAh_zM for ; Wed, 26 Oct 2022 17:14:52 +0200 (CEST) Original-Received: from localhost (240-68-190-109.dsl.ovh.fr [109.190.68.240]) by mail.choca.pics (Postfix) with ESMTPSA id 593C4181942C3 for ; Wed, 26 Oct 2022 17:14:52 +0200 (CEST) Received-SPF: pass client-ip=80.67.172.235; envelope-from=damien@cassou.me; helo=mail.choca.pics X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246240 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Mark-previous-buffer-and-next-buffer-commands-as-rep.patch >From 4bafbad18a0a027207399cf4ba71b7775eb873cb Mon Sep 17 00:00:00 2001 From: Damien Cassou 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 --=-=-=--