From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: IDE Date: Sat, 10 Oct 2015 22:47:27 +0200 Message-ID: <874mhyfo2o.fsf@fencepost.gnu.org> References: <83bnc7tavr.fsf@gnu.org> <5618C92A.3040207@yandex.ru> <83a8rrt9ag.fsf@gnu.org> <5618D376.1080700@yandex.ru> <831td3t62e.fsf@gnu.org> <5618E51D.4070800@yandex.ru> <83twpzrp05.fsf@gnu.org> <5618ED93.8000001@yandex.ru> <83lhbbrnn7.fsf@gnu.org> <56191EBE.5050404@yandex.ru> <83612essaw.fsf@gnu.org> <877fmuix68.fsf@isaac.fritz.box> <8337xispn2.fsf@gnu.org> <56195055.6010409@gmx.at> <87oag6ftoq.fsf@fencepost.gnu.org> <83pp0mr1f7.fsf@gnu.org> <87fv1ifshu.fsf@fencepost.gnu.org> <83lhbar0tn.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444510080 10372 80.91.229.3 (10 Oct 2015 20:48:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Oct 2015 20:48:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 10 22:47:59 2015 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 1Zl13e-000192-QK for ged-emacs-devel@m.gmane.org; Sat, 10 Oct 2015 22:47:58 +0200 Original-Received: from localhost ([::1]:46330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zl13e-0003kM-6a for ged-emacs-devel@m.gmane.org; Sat, 10 Oct 2015 16:47:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zl13C-0003ja-1u for emacs-devel@gnu.org; Sat, 10 Oct 2015 16:47:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zl13B-0003pe-29 for emacs-devel@gnu.org; Sat, 10 Oct 2015 16:47:29 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zl13A-0003pY-Vc for emacs-devel@gnu.org; Sat, 10 Oct 2015 16:47:29 -0400 Original-Received: from localhost ([127.0.0.1]:45907 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zl13A-00015X-A9; Sat, 10 Oct 2015 16:47:28 -0400 Original-Received: by lola (Postfix, from userid 1000) id 402FCE18A7; Sat, 10 Oct 2015 22:47:27 +0200 (CEST) In-Reply-To: <83lhbar0tn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Oct 2015 22:16:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:191177 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Cc: emacs-devel@gnu.org >> Date: Sat, 10 Oct 2015 21:11:57 +0200 >> >> Eli Zaretskii writes: >> >> > I indeed think that we should have infrastructure to turn on a major >> > mode in a region of a buffer. >> > >> > I'm not sure we should use text properties or overlays for that, >> > though. The region could be part of the command that turns on the >> > mode with region limits stored in markers. >> >> A typical LilyPond score file switches into Scheme thousands of times >> (most of the time just for a single scalar Scheme constant where an >> actual mode switch would not necessarily be required, but also for all >> user-defined functions and any non-trivial non-music expression). > > Not sure what you are saying. Is it that a region with two ends is > not enough, and we need a list of regions? If so, I'm okay with that, > and I don't see any serious obstacles to implement that. It's rather a host of regions determined by syntax. This can look like: compressMMRests = #(define-music-function (music) (ly:music?) (_i "Remove the empty bars created by multi-measure rests, leaving just the first bar containing the MM rest itself.") (music-map (lambda (m) (if (eq? 'MultiMeasureRestMusic (ly:music-property m 'name)) #{ \once \set Score.skipBars = ##t #m #} #{ #m #} )) music)) The first # switches into Scheme mode until the end, but then every #{ escape backs into LilyPond mode, and every # inside until #} goes back to Scheme in order to evaluate expressions #t, m, and m in Scheme again. Basically, inside of LilyPond, # escapes into Scheme for a single sexp, and inside of Scheme, #{ escapes into LilyPond until the matching #} is encountered, of course with #sexp again escaping into Scheme. Either can easily form multi-line expressions (or not) but definitely wants to change the mode of font-locking. -- David Kastrup