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: Mon, 10 Mar 2014 09:21:02 +0200 Message-ID: <531D67DE.4030200@yandex.ru> References: <87y50to93u.fsf@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 1394436135 11614 80.91.229.3 (10 Mar 2014 07:22:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2014 07:22:15 +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 Mon Mar 10 08:22: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 1WMuXU-0008Mn-Im for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Mar 2014 08:22:20 +0100 Original-Received: from localhost ([::1]:47030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMuXU-00031S-6F for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Mar 2014 03:22:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMuXJ-000318-Tp for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 03:22:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMuXC-0005dQ-KP for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 03:22:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMuXC-0005dM-Gu for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 03:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WMuXB-0000TB-Qb for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 03:22: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: Mon, 10 Mar 2014 07:22: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.13944360731710 (code B ref 16915); Mon, 10 Mar 2014 07:22:01 +0000 Original-Received: (at 16915) by debbugs.gnu.org; 10 Mar 2014 07:21:13 +0000 Original-Received: from localhost ([127.0.0.1]:58664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WMuWO-0000RV-9u for submit@debbugs.gnu.org; Mon, 10 Mar 2014 03:21:12 -0400 Original-Received: from mail-we0-f178.google.com ([74.125.82.178]:63853) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WMuWK-0000RL-HK for 16915@debbugs.gnu.org; Mon, 10 Mar 2014 03:21:09 -0400 Original-Received: by mail-we0-f178.google.com with SMTP id u56so7847381wes.23 for <16915@debbugs.gnu.org>; Mon, 10 Mar 2014 00:21:07 -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=f1qwoUpAIUC37Za1lSe2TA6BIcJHGn4CYa3TVIBjBos=; b=JR+5XDRZb77A8C8QL0k2YJJGWkFtjl//jwQmY2I25QQPJX/cVCEMl37Q4xWUDJclTy rHefImFRPKNfW4VZi0k3O8z2VtUjC1uWP8SobwWkOUuQy0uJ5DMIaZzhz31o+DHHnQTn 2QUuzAuqQU3Qgi1jx90vAP6ASzzVBzzWxiVo9FgxERrjwt4nHBfhS5Z/MVJG5LtOAaJf 5g4sdh0ZzD3mL6kTXrHAmU0CwTEXo+yXmSwwSZVy9q8pIPiZToGeh+m8CEYGHgM2JJtM cL1D4NJOSBaAYCs3lVBO0FZMOHkFp+ewjEaABOzItvienG2+o9BXyo2/P5BdQJ02juyQ OfSg== X-Received: by 10.180.36.8 with SMTP id m8mr6750134wij.42.1394436067554; Mon, 10 Mar 2014 00:21:07 -0700 (PDT) Original-Received: from [192.168.10.2] (31-125-150.netrun.cytanet.com.cy. [31.153.125.150]) by mx.google.com with ESMTPSA id 15sm48337160wjo.13.2014.03.10.00.21.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 00:21:06 -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:86710 Archived-At: On 07.03.2014 23:04, Stefan Monnier wrote: > My preference would be to think about it as a "multi-mode" case, and > hence make it possible to specify a different syntax-table to use within > the regexp. I remember this idea, but have a hard time viewing it in the context of our latest discussion on the subject of multi-modes. First, why only syntax-table? For this specific case, a syntax table change is not required, we only need to be able to view the text between /'s as a separate context (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. > I think of it along the lines of a new syntax-class, applied to the "/" > char, which would change the syntax-table for the subsequent text. How would this interact with a new hook that would `syntax-ppss' would run on the cached entries? Would its default value look for the chars bearing the new syntax class?