emacs-devel
[Top][All Lists]
Advanced

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

Re: Standardizing more key bindings?


From: Richard Stallman
Subject: Re: Standardizing more key bindings?
Date: Sat, 03 Oct 2020 23:39:47 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > The idea of having one single keymap to implement them presumes that
  > > any given binding is implemented by the same command in all these modes.
  > > Is that true?  I doubt it.

  > That is one possibility suggested in my original message. To have one
  > single entry point for those commands, which then calls functions
  > defined by the mode, similar to how indentation works.

We could implement it that way, but it may not be the best way.  There
is generally no advantage in defining a command simply to call a
variable and have modes change the variable instead of the key's
binding.

Possible drawbacks include:

* It is extra work (even if not very hard work).  It is extra churn.

* It means the doc string can't be adapted for a specific mode.

* It means that a specific mode can't add features to the command.

I set up function variables for indentation operations because they
are _not_ equivalent to the user-level commands.  Rather, they are
lower-level operations, and some of the user-level commands call them
multiple times.

These variables made it possible to have indentation commands which
did nontrivial work in a mode-independent way by calling the
variables' values.

However, over the years, some modes needed to replace the generic
indentation commands with specific ones.

Does this apply to sending code to an interpreter?  I don't know.
Perhaps there is some sub-operation for which it would be nice to
define such a mode-set variable.  But that is another issue.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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