[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Major mode and implementation of expected editing facilities

From: Eli Zaretskii
Subject: Re: Major mode and implementation of expected editing facilities
Date: Tue, 28 May 2019 17:55:17 +0300

> From: Daniele Nicolodi <address@hidden>
> Date: Mon, 27 May 2019 22:40:15 -0600
>   A major mode can also rebind the keys M-n, M-p and M-s. The bindings
>   for M-n and M-p should normally be some kind of moving forward and
>   backward, but this does not necessarily mean cursor motion.
>   It is legitimate for a major mode to rebind a standard key sequence if
>   it provides a command that does the same job in a way better suited to
>   the text this mode is used for. For example, a major mode for editing
>   a programming language might redefine C-M-a to move to the beginning
>   of a function in a way that works better for that language.
> in "Major Mode Conventions", which describes exactly what I want to do,
> but does not give any pointer which key sequences it makes sense and it
> is most common to rebind. For example I don't fins mention of M-q
> (fill-paragraph) which was in my original example.
> Am I overlooking something?

Given the above text, I'm not sure I understand what are you looking
for.  Clearly, what specific keys a major mode can reasonably rebind
depends on the mode and what it does, right?  IOW, it's your decision,
as someone who knows what the mode does, and which of its commands
could be usefully regarded as "generalizations" or "customizations" of
those in the related modes.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]