GNU bug report logs - #14003
24.3.50; sgml-mode: support angle brackets inside jsp tags

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 20 Mar 2013 03:40:02 UTC

Severity: normal

Found in version 24.3.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 14003-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 14003-done <at> debbugs.gnu.org
Subject: Re: bug#14003: 24.3.50; sgml-mode: support angle brackets inside
	jsp tags
Date: Tue, 02 Apr 2013 00:43:28 +0400
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




This bug report was last modified 12 years and 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.