all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Damien Cassou <damien@cassou.me>, 58800@debbugs.gnu.org
Subject: bug#58800: Mark previous-buffer and next-buffer commands as repeatable
Date: Wed, 26 Oct 2022 12:52:37 -0700	[thread overview]
Message-ID: <CADwFkm=2+GkK_5ewzRV7StPYCLdqn2YBFznnjOjtvSoE_Tt=DA@mail.gmail.com> (raw)
In-Reply-To: <87v8o6zkes.fsf@cassou.me>

Damien Cassou <damien@cassou.me> writes:

> 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

Do we really need to add "Copyright-paperwork-exempt"?

You already have changes in emacs.git that takes you way above the 15 or
so lines that we could make an exception for, so I guess you have in
fact signed the papers?  AFAIU, the line shouldn't be used in that case.

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

It should be "<right>" and "<left>" here, I think.

> +
> +(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





  reply	other threads:[~2022-10-26 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-10-30  6:35   ` Damien Cassou
2022-10-30 13:25     ` Stefan Kangas

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='CADwFkm=2+GkK_5ewzRV7StPYCLdqn2YBFznnjOjtvSoE_Tt=DA@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=58800@debbugs.gnu.org \
    --cc=damien@cassou.me \
    /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.