From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.bugs Subject: bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly Date: Tue, 4 Mar 2014 12:02:06 +0200 Message-ID: References: <87y50to93u.fsf@yandex.ru> <5313482E.3050706@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="5315a49e_75a2a8d4_331" X-Trace: ger.gmane.org 1393927396 671 80.91.229.3 (4 Mar 2014 10:03:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2014 10:03:16 +0000 (UTC) Cc: 16915@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 04 11:03:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WKmC1-0005bJ-OK for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Mar 2014 11:03:21 +0100 Original-Received: from localhost ([::1]:43965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmC1-0005lY-C1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Mar 2014 05:03:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmBq-0005eT-Rb for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 05:03:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKmBj-0008Qh-H7 for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 05:03:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmBj-0008QP-Cs for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 05:03:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WKmBi-0001kB-1J for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 05:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Mar 2014 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16915-submit@debbugs.gnu.org id=B16915.13939273336635 (code B ref 16915); Tue, 04 Mar 2014 10:03:01 +0000 Original-Received: (at 16915) by debbugs.gnu.org; 4 Mar 2014 10:02:13 +0000 Original-Received: from localhost ([127.0.0.1]:49797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKmAu-0001it-Jk for submit@debbugs.gnu.org; Tue, 04 Mar 2014 05:02:13 -0500 Original-Received: from mail-ee0-f50.google.com ([74.125.83.50]:34937) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKmAr-0001ik-80 for 16915@debbugs.gnu.org; Tue, 04 Mar 2014 05:02:09 -0500 Original-Received: by mail-ee0-f50.google.com with SMTP id c13so2662971eek.37 for <16915@debbugs.gnu.org>; Tue, 04 Mar 2014 02:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=6t6OBzONZYrr+9JKUdM9wQ+YH6ldrQcFCwrOZo8U4SE=; b=Q7lZ3YXZ2rY3LSJXCGtcf78AJQuoUk9ziZ4zzN1NRWrba3BFNOmPQzj3/hoJbx0y9R ZhTnXvl5nFrINzAaTHP34ZKxta9bQkyYagEeSJMUGZfG2eVTa9AKdnB+IDQ6Wqc3lIHj lsBn66KCZgZTMpnCyO2it1jn1dBoCzt4FIknIY9aRITJN2KqO1pTtYw11NgxFTlVWBgX +5s/Q3Xk+0ZSiKEpHHh0i7NMLBv+iA/pfOzMgHwyz9AEjoWNfdQIHsBqlSHgV3rgd8Ta Z6zYir6ZvIQmY3VJSSBMSjaajWsQ47uYk0Qx6fmf2CO5p+BQJOGfvcAVxtjTlLqHPCaG XoZw== X-Received: by 10.15.75.66 with SMTP id k42mr45759754eey.2.1393927328364; Tue, 04 Mar 2014 02:02:08 -0800 (PST) Original-Received: from [192.168.1.28] ([95.87.231.111]) by mx.google.com with ESMTPSA id a2sm61247033eem.18.2014.03.04.02.02.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 04 Mar 2014 02:02:07 -0800 (PST) In-Reply-To: <5313482E.3050706@yandex.ru> X-Mailer: sparrow 1.6.4 (build 1178) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86521 Archived-At: --5315a49e_75a2a8d4_331 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday, March 2, 2014 at 5:03 PM, Dmitry Gutov wrote: > On 02.03.2014 13:03, Bozhidar Batsov wrote: > > Native regexp support is preferable IMO. After all - regexps are not > > strings. If they were treated differently we=E2=80=99d also be able t= o have > > extra highlighting for things like named groups, quantifiers, regexp > > classes, etc. I guess, however, that this would require a lot of work= . > > =20 > =20 > =20 > Since the regexp syntax can be different between languages, we probably= =20 > won't get all of that automatically. The direct benefits from the nativ= e =20 > support I can see is highlighting comments (for regexps with appropriat= e =20 > modifiers, in languages that support that), new faces for regexp itself= , =20 > and maybe for groups, quantifiers, etc. > =20 > =20 That would be totally sufficient, but I have no idea how much work it wou= ld require. =20 > =20 > The highlighting of the elements inside regexp would probably have to b= e =20 > done the old-fashioned way, in font-lock-keywords (although that code =20 > could be shared between many languages). We could implement something =20 > like it right now, the main difference is just the lack of standard fac= es. > =20 > =20 Many modes introduce =22non-standard=E2=80=9D faces, so the lack of non-s= tandard faces is not a significant problem I think (though I=E2=80=99d lo= ve to see faces for regexps, command execution (%x, =60=60 as in sh-mode)= and symbols/keywords (as they are present in many languages outside Ruby= ). =20 =20 --5315a49e_75a2a8d4_331 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On Su= nday, March 2, 2014 at 5:03 PM, Dmitry Gutov wrote:
On 02.03.2014 13:03, Bozhidar Ba= tsov wrote:
Native regexp su= pport is preferable IMO. After all - regexps are not
strings. I= f they were treated differently we=E2=80=99d also be able to have
extra highlighting for things like named groups, quantifiers, regexp
classes, etc. I guess, however, that this would require a lot of= work.

Since the regexp synta= x can be different between languages, we probably
won't get al= l of that automatically. The direct benefits from the native
s= upport I can see is highlighting comments (for regexps with appropriate <= /div>
modifiers, in languages that support that), new faces for regex= p itself,
and maybe for groups, quantifiers, etc.
<= /div>
That would = be totally sufficient, but I have no idea how much work it would require.=  
<= div>

The highlighting of the elements inside rege= xp would probably have to be
done the old-fashioned way, in fo= nt-lock-keywords (although that code
could be shared between m= any languages). We could implement something
like it right now= , the main difference is just the lack of standard faces.
Many modes introduce =22non-standard=E2=80=9D = faces, so the lack of non-standard faces is not a significant problem I t= hink (though I=E2=80=99d love to see faces for regexps, command execution= (%x, =60=60 as in sh-mode) and symbols/keywords (as they are present in = many languages outside Ruby). 
 
=20

--5315a49e_75a2a8d4_331--