From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: A vision for multiple major modes [was: Re: [Emacs-diffs] widen-limits c331b66:] Date: Fri, 25 Mar 2016 18:20:09 +0000 Message-ID: <87bn62ctd2.fsf@russet.org.uk> 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> <20160323211605.GA5324@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459074126 21666 80.91.229.3 (27 Mar 2016 10:22:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Mar 2016 10:22:06 +0000 (UTC) Cc: Vitalie Spinu , Andreas =?utf-8?Q?R=C3=B6hler?= , emacs-devel@gnu.org, Stefan Monnier , Dmitry Gutov , Eli Zaretskii , Drew Adams To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 27 12:21:55 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 1ak7pT-0007QC-8h for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2016 12:21:55 +0200 Original-Received: from localhost ([::1]:35358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ak7pS-0000mM-26 for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2016 06:21:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ak7pA-0000kL-8t for emacs-devel@gnu.org; Sun, 27 Mar 2016 06:21:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ak7p8-0000CD-Sv for emacs-devel@gnu.org; Sun, 27 Mar 2016 06:21:36 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:56706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ak7p8-0008VT-Lo; Sun, 27 Mar 2016 06:21:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:References:Message-ID :Date:In-Reply-To:Subject:Cc:To:From; bh=qzqNrhMcH0XIFjKIpLw0ZNDtlevr6wB2pzq0Db9VmVg=; b=UNBJZLQUnFfJIR+JV7k+yslT0O +F9UunxlmKQuX/CkiofqH2JQ7mIqXpXP9n1IW7cqxzUl6r9qJidlYHaBLGgpYx8fZOc2dQyTTK0pi FhsOeRYwlURsS1z1c5pkB1Hb7506XA83aBCHH9dzQ3dN7KeptnzIHaOq4f0MkepW07rCUIwjmQhhG ywH4b7d7rTdJACbLsBRpOawNy0FwzbAB6n3DKQ2S+LQuF7zjickg5pceB2TJ67Beb82JZibBBjkJr wi169gNDQ/UjIabmdXmrRbxw+117R33TUgTdMriZgX3R0ZsCH3zRPAC+tcXyEmofu172ZTxDGCeg+ RClFMVLg==; Original-Received: from [90.216.189.44] (port=48142 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1ak7oT-003wjX-3c; Sun, 27 Mar 2016 11:20:53 +0100 In-Reply-To: <20160323211605.GA5324@acm.fritz.box> (Alan Mackenzie's message of "Wed, 23 Mar 2016 21:16:05 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 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:202277 Archived-At: Alan Mackenzie writes: >> I proposed (4) very early in the thread, but didn't hear much support for >> it. There are only three trivial usages of Fwiden in C code. Bringing `narrow` >> to elisp is equally easy. > > All these options strike me as artificial, ad hoc, and ugly. I would go > for option number (5) - to transcend the "unwanted widen" problem - to > enhance Emacs such that users and Lisp hackers can freely narrow and > widen _without_ upsetting the @dfn{super mode} (the multiple mode > handling mode). > > What is a major mode? It is a collection of local variable settings, a > syntax table, an abbreviation table, a mode specific key map, font lock > mode settings, an indentation engine, Imenu settings, and one or two > other things. And a visualisation of all of the above. It's also an assumption that it's unique in a buffer. And, it's not really the above, because you can change any of these values in an individual buffer, even if it stays in the same mode. So, more a major mode is a mechanism for setting all of the above. > Although the above vision implies a lot of development work, there is > nothing there which is beyond our abilities to implement readily. It > would give us a true multi major mode capability, yet the impact on > individual major modes would be minimal. We already have a mechanism to seperate and make instances of all the things that you speak out above -- it's called a new buffer; the most sensible way, then, is to have multiple modes is, surely, to have multiple buffers. Phil