From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Major mode and implementation of expected editing facilities Date: Tue, 28 May 2019 17:55:17 +0300 Message-ID: <835zpu1ve2.fsf@gnu.org> References: <82832b3f-9e1c-cc3a-0a47-24e752e5b56c@grinta.net> <83blzn1epr.fsf@gnu.org> <0638d02d-967a-f0db-89f7-02f97bab87ba@grinta.net> <0C100B81-F296-44C7-8098-3111C709A8F1@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="235109"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Daniele Nicolodi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 28 16:55:44 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVdVw-000z13-Cf for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 16:55:44 +0200 Original-Received: from localhost ([127.0.0.1]:36338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVdVv-0003XX-ET for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 10:55:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVdVp-0003Wp-Cy for emacs-devel@gnu.org; Tue, 28 May 2019 10:55:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVdVg-0003Qt-D5; Tue, 28 May 2019 10:55:31 -0400 Original-Received: from [176.228.60.248] (port=2382 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hVdVP-0000zy-8f; Tue, 28 May 2019 10:55:21 -0400 In-reply-to: (message from Daniele Nicolodi on Mon, 27 May 2019 22:40:15 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237101 Archived-At: > From: Daniele Nicolodi > 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.