From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Standardizing more key bindings? Date: Sat, 03 Oct 2020 23:39:47 -0400 Message-ID: References: Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, emacs-devel@gnu.org To: thibaut.verron@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 04 05:43:17 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOuvd-0004g8-C9 for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Oct 2020 05:43:17 +0200 Original-Received: from localhost ([::1]:37604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOuvc-0004D7-Ed for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Oct 2020 23:43:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOusI-0008Cd-HG for emacs-devel@gnu.org; Sat, 03 Oct 2020 23:39:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34542) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOusH-00008R-1d; Sat, 03 Oct 2020 23:39:49 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1kOusF-0004ji-VC; Sat, 03 Oct 2020 23:39:48 -0400 In-Reply-To: (message from Thibaut Verron on Fri, 2 Oct 2020 08:26:14 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257007 Archived-At: [[[ 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)