From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov 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: Sun, 02 Mar 2014 00:19:17 +0200 Message-ID: <87y50to93u.fsf@yandex.ru> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393712411 24857 80.91.229.3 (1 Mar 2014 22:20:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2014 22:20:11 +0000 (UTC) Cc: 16915@debbugs.gnu.org To: Bozhidar Batsov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 01 23:20:19 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 1WJsGY-00007n-1L for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Mar 2014 23:20:18 +0100 Original-Received: from localhost ([::1]:32802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJsGX-0001qK-GU for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Mar 2014 17:20:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJsGP-0001aR-2I for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2014 17:20:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJsGI-0005fQ-T4 for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2014 17:20:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJsGI-0005f6-Pt for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2014 17:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WJsGH-0000FW-Pz for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2014 17:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Mar 2014 22:20: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.1393712366910 (code B ref 16915); Sat, 01 Mar 2014 22:20:01 +0000 Original-Received: (at 16915) by debbugs.gnu.org; 1 Mar 2014 22:19:26 +0000 Original-Received: from localhost ([127.0.0.1]:47057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJsFh-0000Ec-Tg for submit@debbugs.gnu.org; Sat, 01 Mar 2014 17:19:26 -0500 Original-Received: from mail-ee0-f53.google.com ([74.125.83.53]:35207) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJsFg-0000ET-3N for 16915@debbugs.gnu.org; Sat, 01 Mar 2014 17:19:24 -0500 Original-Received: by mail-ee0-f53.google.com with SMTP id e51so1997695eek.26 for <16915@debbugs.gnu.org>; Sat, 01 Mar 2014 14:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=CnDKShOpLzOi3KmsGMVxA2aDR+Es7YmXRRlH91Zw0dk=; b=HrCjBuy8Ke4jzqX2Z7dUT10Za/kd5dfXfjgqiONwxP64etc8Kmzc0xcUI9PTg8S4zz J6KePkAv2KC09oDee9pQZf1YFIaFZctVYZoG0I1SLlIRq9i9mMoDaFU4aiuBVAqVgkix zbgVmc1VNsrnuwZrmpcDQEDCQkxGIkHiepEWV750BVDdj4eLSCklVIqYtnHSkKmKkWd/ 4k4Um5OzRUwx5ndYtGwHL0TspqHQV0LKE2f2BIcG54rPeOGyLVj147c4VmWGe7Xz3Mb0 T4+e+2lwaArXAeZvMLM9r1klD2cgSsq31FG9LVhWe3U4k7hZLokj4LKhhfdRws9PM354 jDZQ== X-Received: by 10.14.194.2 with SMTP id l2mr30060078een.39.1393712363394; Sat, 01 Mar 2014 14:19:23 -0800 (PST) Original-Received: from axl ([93.109.195.252]) by mx.google.com with ESMTPSA id x45sm2739791eef.15.2014.03.01.14.19.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 01 Mar 2014 14:19:22 -0800 (PST) In-Reply-To: (Bozhidar Batsov's message of "Sat, 01 Mar 2014 15:31:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:86462 Archived-At: Bozhidar Batsov writes: > In most editors/IDEs code like this > > regexp = / > start # some text > \s # white space char > (group) # first group > (?:alt1|alt2) # some alternation > end > /x > > will have the comments font-locked as comments, because comments are > allowed in the extended regexp literal syntax (/x). It would be nice > if this was taken into account in ruby-mode as well. Not sure how to implement it best. Ideally, we'd have a new kind of syntax instead of strings (native regexp support?), which would make font-lock fontify comments inside. Or maybe a modifier on the string syntax? Of course, we could just scan the contents of every regexp, look for any hash character that doesn't look like it starts interpolation, and forcibly fontify the text from it till the end of line.