From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality Date: Wed, 23 Mar 2016 14:57:49 -0700 (PDT) Message-ID: <592bbafa-76ae-49d9-b5cd-644b3619a0d8@default> References: <20160322022539.16038.77264@vcs.savannah.gnu.org> <8737riqouj.fsf@gmail.com> <221845e0-b194-433e-bfbc-105272ae5752@default> <87twjyp21k.fsf@gmail.com> <56F242E0.7060004@online.de> <877fgtpfrw.fsf@gmail.com> <56F293E7.2000703@online.de> <87a8lpnusg.fsf@gmail.com> <83r3f12oo5.fsf@gnu.org> <56F2D156.9040401@online.de> <83k2kt2i51.fsf@gnu.org> <56F2E643.4060903@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458770312 8189 80.91.229.3 (23 Mar 2016 21:58:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 21:58:32 +0000 (UTC) Cc: spinuvit@gmail.com, emacs-devel@gnu.org To: =?iso-8859-1?B?QW5kcmVhcyBS9mhsZXI=?= , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 22:58:19 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiqnD-0007Qa-4n for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 22:58:19 +0100 Original-Received: from localhost ([::1]:46322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiqn9-0001bk-Cs for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 17:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiqn5-0001bS-S4 for emacs-devel@gnu.org; Wed, 23 Mar 2016 17:58:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiqn4-0001YH-Ve for emacs-devel@gnu.org; Wed, 23 Mar 2016 17:58:11 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:49894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiqn1-0001Xk-2D; Wed, 23 Mar 2016 17:58:07 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2NLw0xf016674 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 23 Mar 2016 21:58:02 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u2NLvwBh019477 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 23 Mar 2016 21:58:00 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u2NLvpiR023246; Wed, 23 Mar 2016 21:57:57 GMT In-Reply-To: <56F2E643.4060903@online.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202149 Archived-At: > >> doku of prog-widen says > >> > >> "This variable enables the major mode of the > >> main language to use the indentation engine of the sub-mode" > >> > >> This also doesn't sound right. > > Please read the description in the ELisp manual instead. >=20 > So let's read this (prog-widen): >=20 > " ... to remove any restrictions > imposed by the mode's indentation engine and restore the > restrictions recorded in 'prog-indentation-context'. This prevents > the indentation engine of a sub-mode from inadvertently operating > on text outside of the chunk it was supposed to indent, and > preserves the restriction imposed by the superior mode. When no > superior mode is in effect, this function just calls 'widen'. > " >=20 > Don't see in which way this should be better. It lays the burden of > dealing with the mode in place into prog-mode. IMO wrong place, wrong > direction. >=20 > Expect prog-mode do deliver very basic things common to all programming > modes. Not dealing with and fixing special needs there. >=20 > Modes must meet the specific languages. Prog-mode must not be specific > and not provide tools for storing things like indentation-context. Let > the modes indent, fontify and jump around like they want - not thwarting > their settings seems all needed here. Worse yet - What's a "sub-mode"? The term is introduced nowhere in either the Emacs manual or the Elisp manual. It's not in the Elisp manual index. It is used only in the node mentioned, and with no definition or explanation. That's a bug, IMO. One might assume that it just means any major mode that inherits from (i.e., derived from) `prog-mode' (since the term is used only in the context of `prog-mode'). But one should not have to assume. And the text about indentation and the use of sub-mode for only a given chunk of text in a buffer is incomprehensible without some explanation. Normally, a major mode, no matter whether it is derived from some other major mode, has its effect on the entire buffer. It seems there is some non-negligible functionality/behavior/feature that has not been documented. Not up to Emacs standards, it appears. It looks like someone perhaps implemented something and just tossed some minimal doc into the manual, in the form of doc-string-like text for a couple functions. Insufficient. Please explain what this is all about.