Subject: bug#34080: 27.0.50, 26.1; undocumented key bindings for *vc-diff*

From: Sean Whitton <[email-masked]>
Date: Tue, 08 Jul 2025 18:17:09 +0100

Hello,

Putting aside the possible bug in where-is-internal, the basic issue in
this report is how the TAB and <backtab> bindings don't appear in C-h m
for *vc-diff* buffers.

The reason for this is, I think, simple: C-h m describes the major
mode's own map, diff-mode-map, but the TAB binding does not appear in
that map.  It's only in diff-mode-shared-map, the parent of
diff-mode-map.

We probably don't want C-h m to include bindings from the parents of
major mode maps.  Right?  It seems like that would mean including too
much.

So I am wondering whether we should consider copying the bindings from
diff-mode-shared-map into the maps that share it.  It means more
repetition in our definitions but better *Help* output.  Usually we
write these maps out longform even if it means duplication.

But there is something about diff-mode-shared-map that I can't figure
out.  How do its bindings get overridden/deactivated in the case that
the buffer is not read-only?  Adding Stefan to the CC -- can you point
me to what I'm missing about how diff-mode-shared-map is meant to work?

Thanks.

-- 
Sean Whitton