From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A vision for multiple major modes: some design notes Date: Thu, 21 Apr 2016 22:55:29 +0300 Message-ID: <83eg9y68jy.fsf@gnu.org> References: <<20160420194450.GA3457@acm.fritz.box> <05d5bd7e-1cea-4336-a37c-fe6bd6752558@default> <20160421124325.GC1775@acm.fritz.box>> <<64f1d39a-dfd0-44ca-86c1-b4d6104b5702@default>> <<83oa926i0e.fsf@gnu.org>> <791d74d1-2b1d-4304-8e7e-d6c31af7aa41@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1461268567 22270 80.91.229.3 (21 Apr 2016 19:56:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2016 19:56:07 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 21 21:55:59 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 1atKhg-0002c6-3f for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2016 21:55:56 +0200 Original-Received: from localhost ([::1]:47166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atKhe-0006yQ-Ng for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2016 15:55:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atKhO-0006vA-H5 for emacs-devel@gnu.org; Thu, 21 Apr 2016 15:55:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atKhL-0000VN-0S for emacs-devel@gnu.org; Thu, 21 Apr 2016 15:55:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atKhK-0000VJ-QJ; Thu, 21 Apr 2016 15:55:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1579 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1atKhK-0003vt-2R; Thu, 21 Apr 2016 15:55:34 -0400 In-reply-to: <791d74d1-2b1d-4304-8e7e-d6c31af7aa41@default> (message from Drew Adams on Thu, 21 Apr 2016 09:59:02 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:203154 Archived-At: > Date: Thu, 21 Apr 2016 09:59:02 -0700 (PDT) > From: Drew Adams > Cc: acm@muc.de, emacs-devel@gnu.org > > But just what does "the parts that affect redisplay" mean? > If we mean parts that need to do something particular wrt > redisplay, then yes, that makes sense. I mean the part that is needed for redisplay to behave in each island according to user expectations. For example, imagine that a mode that is relevant to a certain island chain sets up face-remapping-alist in some particular way -- when redisplay does its job, it repeatedly consults this variable when it needs to compute faces. I'm saying that the part of the changes for this feature that affects redisplay will have to arrange for recalculation of the value of face-remapping-alist when the display engine gets to examining the portion of buffer text that belongs to this island chain. Since the position where the display engine processes is not visible to Lisp, this arrangement will have to be in C. And similarly with any other variable whose value the display engine accesses from its C code, like standard-display-table, for example. > You mentioned earlier that redisplay needs to access > buffer-local variables as it moves through the buffer. > And you said that redisplay needs to get the right values > of such variables. > > But for some island-chain operations, e.g. some that I'm > thinking of that do not care about the mode of a chain > or whether it even has a mode, I don't see why redisplay > would need to do anything special. This could be so in some particular use cases, but it's not so in general. Modes do affect the way text is displayed. Besides, Alan says that "most" buffer-local variables will become island-chain local. If we believe him, then your use cases you mention above are lucky exceptions rather than the rule.