From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: font-lock-syntactic-keywords obsolet? Date: Sun, 19 Jun 2016 15:18:36 +0000 Message-ID: <20160619151836.GE5875@acm.fritz.box> References: <57627D13.5090008@online.de> <5764F25B.4010204@online.de> <20160618171249.GA5796@acm.fritz.box> <20160619133143.GA5875@acm.fritz.box> <20160619145934.GC5875@acm.fritz.box> <6bc7b3bc-ddb7-c041-9f68-f8b5faeca63b@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1466349605 32037 80.91.229.3 (19 Jun 2016 15:20:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2016 15:20:05 +0000 (UTC) Cc: emacs-devel@gnu.org, Noam Postavsky To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 19 17:19: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 1bEeVy-0003bG-QF for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2016 17:19:58 +0200 Original-Received: from localhost ([::1]:39028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEeVy-0004yI-4n for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2016 11:19:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEeUY-0003o1-8g for emacs-devel@gnu.org; Sun, 19 Jun 2016 11:18:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEeUT-00062E-8C for emacs-devel@gnu.org; Sun, 19 Jun 2016 11:18:30 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:50152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEeUS-00061k-TY for emacs-devel@gnu.org; Sun, 19 Jun 2016 11:18:25 -0400 Original-Received: (qmail 90454 invoked by uid 3782); 19 Jun 2016 15:18:24 -0000 Original-Received: from acm.muc.de (p4FC46D0C.dip0.t-ipconnect.de [79.196.109.12]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 19 Jun 2016 17:18:22 +0200 Original-Received: (qmail 7785 invoked by uid 1000); 19 Jun 2016 15:18:36 -0000 Content-Disposition: inline In-Reply-To: <6bc7b3bc-ddb7-c041-9f68-f8b5faeca63b@yandex.ru> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 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:204518 Archived-At: Hello, Dmitry. On Sun, Jun 19, 2016 at 06:07:32PM +0300, Dmitry Gutov wrote: > On 06/19/2016 05:59 PM, Alan Mackenzie wrote: > > No, it can't. If you remove (from a C++ buffer) a terminating template > > delimiter (">"), that will have the effect of removing the syntax-table > > text property from its former matching opener ("<"). > What if you remove the opener first? And then the closer? Will it try to > find another opener then? > >> If so, what if I remove a closing double-quote instead? > > Good question. I put printf's (in effect) into the three routines which > > can expand the scanning region in the after-change-function, and > > removing a closing double-quote doesn't cause that region to be expanded > > beyond the current line. > What about strings like > std::cout << "\ > This is a\n\ > multiline\n\ > string.\ > "; > or > const char* s1 = R"foo( > Hello > World > )foo"; > ? > The latter being the case that many languages have to deal with: > multi-line string literals. The region which will be scanned for the application of syntax-table properties is expanded to the "logical" line containing the string. The critical thing is it is not expanded to EOB, even when removing the terminating double quote. -- Alan Mackenzie (Nuremberg, Germany).