[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64868: 29.1; C-x O binding suggestion for (other-window -1)
From: |
Eli Zaretskii |
Subject: |
bug#64868: 29.1; C-x O binding suggestion for (other-window -1) |
Date: |
Wed, 02 Aug 2023 20:01:29 +0300 |
> Date: Wed, 2 Aug 2023 16:45:35 GMT
> From: Van Ly <van.ly@sdf.org>
> Cc: 64868@debbugs.gnu.org
>
> > > Is there a way to overlay ``b'' in the read-only modes such as
> > > view-mode to function in the opposite direction to SPC.
> >
> > I don't understand what you mean by "overlay". The function in the
> > opposite direction of SPC is View-scroll-page-backward, so if you want
> > to bind it to some non-default key, you can (although it already has a
> > convenient binding to S-SPC).
>
> As examples, in the occur-mode-hook and view-mode-hook I map "b" to
> scroll-down-command and View-scroll-line-backward. Can that be done
> once by grouping occur-mode and view-mode as members in a read-only
> mode for "b" to function that way to page in the opposite direction
> SPC would scroll?
Each mode has its own keymap. So no, that's not possible, by using
just the key binding commands.
> Well, in view-mode there are many "self-insert-command" keys mapped
> such as "b" or "i" or "j". I expect the key bindings to
> self-insert-command in read-only modes to be unused.
That's not how such Emacs modes work. Having commands bound to
self-inserting characters make it easy to invoke those commands.