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: Thu, 30 Jun 2016 09:52:15 +0000 Message-ID: <20160630095215.GB3082@acm.fritz.box> References: <20160620152535.GB2192@acm.fritz.box> <076b7311-ad16-4913-b0ec-fc73ea4550a1@yandex.ru> <20160620181218.GC2192@acm.fritz.box> <20160620200830.GE2192@acm.fritz.box> <18697155-06d3-2191-6a6b-3ea58e8d17cb@yandex.ru> <20160621144047.GB3177@acm.fritz.box> <20160623163021.GA4946@acm.fritz.box> <7762a6a6-9554-945d-cc5a-4a14157eaeb0@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467280361 18564 80.91.229.3 (30 Jun 2016 09:52:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 09:52:41 +0000 (UTC) Cc: Noam Postavsky , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 30 11:52:32 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 1bIYe4-0002u3-HX for ged-emacs-devel@m.gmane.org; Thu, 30 Jun 2016 11:52:29 +0200 Original-Received: from localhost ([::1]:48132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIYe3-0005Jn-2R for ged-emacs-devel@m.gmane.org; Thu, 30 Jun 2016 05:52:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIYdr-0005H6-5y for emacs-devel@gnu.org; Thu, 30 Jun 2016 05:52:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIYdl-0004H0-9I for emacs-devel@gnu.org; Thu, 30 Jun 2016 05:52:14 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:58968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIYdk-0004Gq-VH for emacs-devel@gnu.org; Thu, 30 Jun 2016 05:52:09 -0400 Original-Received: (qmail 83622 invoked by uid 3782); 30 Jun 2016 09:52:07 -0000 Original-Received: from acm.muc.de (p4FC460AB.dip0.t-ipconnect.de [79.196.96.171]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 30 Jun 2016 11:52:05 +0200 Original-Received: (qmail 3437 invoked by uid 1000); 30 Jun 2016 09:52:15 -0000 Content-Disposition: inline In-Reply-To: <7762a6a6-9554-945d-cc5a-4a14157eaeb0@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:204978 Archived-At: Hello, Dmitry. On Wed, Jun 29, 2016 at 03:30:27AM +0300, Dmitry Gutov wrote: > On 06/23/2016 07:30 PM, Alan Mackenzie wrote: > > 1)... There were two functions in cc-fonts.el that were using > > (point-max) as a limit for something, when they should have been using, > > respectively, (min limit (point-max)), and limit. A bit of playing > > around suggests there is more to fix, there. > So now the raw strings are properly using limits? Does that mean there > is a limit on the length of a raw string that CC Mode supports? (Testing > indicates so). There isn't any limit on the length of a raw string that I know about, nor should there be. If you've got a test which shows there is such a limit, please tell me about it! The "limit" in my previous post was a bound supplied as an argument to c-font-lock-declarators, which does what it says. Up till now, that precise bound wasn't important, since the function stopped anyway when it reached the end of a (declaration) statement. But with unterminated raw strings, that didn't work, and the bound became important. > Maybe it's not too terrible, but, depending on the limit's value, it > could be a problem in certain specialized files (e.g. in a game sources > where the author decided to keep some art assets in the code, or in some > test files). > Anyway, that's the performance-vs-correctness tradeoff I've mentioned > earlier. Using syntax-propertize-function, I've never seen the necessity > to make that choice, so far. And Ruby has several counterparts to C++'s > raw strings, all with irregular syntax. > > 2) ... This was caused by a low level function failing to do > > (save-match-data ...) around a (looking-at ....) with the result that > > the match-data was corrupted for the higher level function. That bug's > > been there for some while. > That works now, thanks. Excellent! -- Alan Mackenzie (Nuremberg, Germany).