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: Wed, 12 Mar 2014 09:48:01 +0200 Message-ID: <53201131.3080400@yandex.ru> References: <87y50to93u.fsf@yandex.ru> <531D67DE.4030200@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1394610554 19920 80.91.229.3 (12 Mar 2014 07:49:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Mar 2014 07:49:14 +0000 (UTC) Cc: 16915@debbugs.gnu.org, Bozhidar Batsov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 12 08:49:22 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 1WNduj-0004WM-Cl for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Mar 2014 08:49:21 +0100 Original-Received: from localhost ([::1]:59159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNdui-0007o2-KF for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Mar 2014 03:49:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNduY-0007ne-MX for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 03:49:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNduR-0007bI-Ci for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 03:49:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNduR-0007bD-80 for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 03:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WNduQ-0001Fz-5X for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 03:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Mar 2014 07:49: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.13946104934757 (code B ref 16915); Wed, 12 Mar 2014 07:49:01 +0000 Original-Received: (at 16915) by debbugs.gnu.org; 12 Mar 2014 07:48:13 +0000 Original-Received: from localhost ([127.0.0.1]:33859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNdtc-0001Ee-Ma for submit@debbugs.gnu.org; Wed, 12 Mar 2014 03:48:13 -0400 Original-Received: from mail-wi0-f176.google.com ([209.85.212.176]:53117) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNdtW-0001EP-RV for 16915@debbugs.gnu.org; Wed, 12 Mar 2014 03:48:07 -0400 Original-Received: by mail-wi0-f176.google.com with SMTP id hr14so1956472wib.15 for <16915@debbugs.gnu.org>; Wed, 12 Mar 2014 00:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Yr11CUCIKELZsCLJlAc/s3hQ9iY//xu60qz279ksfPU=; b=J77upFW3w8vZ9NhPg/u38+NXdZAGSaivaYyXn7B2sd6s7RvaH5SqUQGhXmHbfwwPq5 ugS85X34av5gMj29o3mHwtB2WlmFkM1TqhQvZfHek4adC4RjQU/MYsieJutDNQSGzg76 uXZhoZgKbheC0Mz8KrPBao/yeAmXABQf9At5bxd6no8ozK+aiFWL4SRabQJjCkFgQE3+ igKmDuzStTxNjgoll9z8meu9ncQJWVecVyQutmTmNPW8jE+XQV51VVVb6sdWSHpIcUBV k5VMDEJNOUzTuHxXfHy7Y0zi19DTr6BICdDUbxnm1yrowTqJ5CErGZ6HWFOxVvxLSAJZ A+6g== X-Received: by 10.180.89.225 with SMTP id br1mr6334713wib.38.1394610485687; Wed, 12 Mar 2014 00:48:05 -0700 (PDT) Original-Received: from [192.168.10.2] ([93.109.49.57]) by mx.google.com with ESMTPSA id f7sm67570826wjb.7.2014.03.12.00.48.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 00:48:04 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: 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:86759 Archived-At: On 10.03.2014 16:40, Stefan Monnier wrote: > We usually use syntax-tables for that. They do provide more flexibility > than needed (so far), such as making it possible to allow different > commenting conventions within the new context. But it seems like > a "simple" way to handle the problem, so the extra generality is a bonus. To handle this part of the problem (literals within literals), yes, certainly. >> (but - and this is a change from certain other multi-mode uses - still >> fontify uncommented text inside them with the regexp face). But in the >> general case, we would at least want to be able to change >> font-lock-keywords, too. > > `font-lock-keywords' can use `syntax-ppss' to decide which rules to use > (since syntax-ppss would have to include the "context state" somewhere > in its output). It's not terribly convenient to do currently, so we may > want to provide a new replacement for font-lock-keywords which makes it > easier (and avoids relying on "eval" while we're at it). If we're speaking of multiple modes in general, syntax-ppss might not be enough to determine which keywords to highlight. Even if it includes information about new syntax classes. Suppose we have an HTML file with