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#14003: 24.3.50; sgml-mode: support angle brackets inside jsp tags Date: Tue, 02 Apr 2013 00:43:28 +0400 Message-ID: <5159F170.9020903@yandex.ru> References: <87k3p2rbc4.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 1364849059 17298 80.91.229.3 (1 Apr 2013 20:44:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 20:44:19 +0000 (UTC) Cc: 14003-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 01 22:44:43 2013 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 1UMlar-0006hA-JJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Apr 2013 22:44:41 +0200 Original-Received: from localhost ([::1]:46188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMlaT-0007jQ-3q for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Apr 2013 16:44:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMlaN-0007hi-K1 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:44:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMlaL-0000rd-3G for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:44:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMlaK-0000rP-VS for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:44:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UMld8-0007sH-KG for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:47:02 -0400 Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2013 20:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 14003 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 14003@debbugs.gnu.org, dgutov@yandex.ru, dgutov@yandex.ru Original-Received: via spool by 14003-done@debbugs.gnu.org id=D14003.136484918530212 (code D ref 14003); Mon, 01 Apr 2013 20:47:02 +0000 Original-Received: (at 14003-done) by debbugs.gnu.org; 1 Apr 2013 20:46:25 +0000 Original-Received: from localhost ([127.0.0.1]:56520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMlcW-0007rE-EV for submit@debbugs.gnu.org; Mon, 01 Apr 2013 16:46:25 -0400 Original-Received: from mail-la0-f41.google.com ([209.85.215.41]:40635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMlcT-0007r3-7H for 14003-done@debbugs.gnu.org; Mon, 01 Apr 2013 16:46:22 -0400 Original-Received: by mail-la0-f41.google.com with SMTP id fo12so2482527lab.14 for <14003-done@debbugs.gnu.org>; Mon, 01 Apr 2013 13:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-antivirus:x-antivirus-status; bh=c/KQV6IXgQWQCeRkuhAGip7bhYAXjHlH1EOGwscy2ZM=; b=ZVDdUhhUvS62StlBOB9C9pVNFF5VvSg6kkYtzkOv8KD+3o/+Qy097qFUONHopVAGSE XCXItdAmwpwWM58se7xmeH8eXl4E+Ih8y1O0zdvQu3yUmxS+/JgJ1VVqmyq8QfPh7kCU 1WUa5uIS/mPyWOKGr753ueZ/+67Yxw+mfdQPgElRdeFwyk5F0weczxGMZAUyCjB5UPHJ RMzHDMIQnHopNHuXzzn3tz5k3ibmu+wwo0XHA7OFX8iY5nkb3V1iorh7cqX7f7e+icuP vTqqPvv6JUZ9KiwTIxWTI2034+bfk3MZdyWy3OwV6coPcRv+zWKsXN8u3qZSbhr7a7Ty Vh5g== X-Received: by 10.152.105.109 with SMTP id gl13mr6322813lab.40.1364849005798; Mon, 01 Apr 2013 13:43:25 -0700 (PDT) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id fl9sm6009865lbb.9.2013.04.01.13.43.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Apr 2013 13:43:24 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: X-Antivirus: avast! (VPS 130401-0, 01.04.2013), Outbound message X-Antivirus-Status: Clean X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:73082 Archived-At: On 01.04.2013 17:32, Stefan Monnier wrote: >> Before I started writing this text, I had another approach in mind, but >> this is something that I can probably do in mmm-mode instead, without >> changing sgml-mode, by wrapping submodes' syntax-propertize-functions. >> Still, doing it sgml-mode should be simpler. >> Thoughts? > > I agree doing it in sgml-mode would be simpler. I've thought about it some more, and looks like it would be incompatible with what mmm-mode is currently doing. One of the latest additions is the composite syntax-propertize-function: https://github.com/purcell/mmm-mode/blob/master/mmm-region.el#L806 It iterates over the regions and calls syntax-propertize-function of each major mode, passing it the bounds of the region. So adding propertization of angle brackets to sgml-syntax-propertize-function won't help because it won't be called on submode regions. Wrapping propertize-functions of the submodes with that logic should work fine, though. So I guess I'll just close this bug. > I do think that multi-major-mode support should let us handle > comments/strings in a separate mode (text-mode, by default). But I'm > not sure if current multi-major-mode packages are up to that task. Eh, maybe? With some caveats, probably, but delineating subregions based on string/comment status should be doable with a custom matcher function. But it doesn't seem to solve any big problems, AFAICT. Handling code regions nested inside interpolated regions in strings, which I've posted about in emacs-devel before, would be nice to have, but it's much less of an immediate problem, especially since nobody uses this syntax feature of Ruby in real code much. Handling it via mmm-mode, at least, is also problematic, because the syntactic state carries between subregions. So the text inside a string subregion will still be highlighted as string: https://github.com/purcell/mmm-mode/issues/25