From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 14003-done@debbugs.gnu.org
Subject: bug#14003: 24.3.50; sgml-mode: support angle brackets inside jsp tags
Date: Tue, 02 Apr 2013 00:43:28 +0400 [thread overview]
Message-ID: <5159F170.9020903@yandex.ru> (raw)
In-Reply-To: <jwvppyez8cw.fsf-monnier+emacs@gnu.org>
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
next prev parent reply other threads:[~2013-04-01 20:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 3:36 bug#14003: 24.3.50; sgml-mode: support angle brackets inside jsp tags Dmitry Gutov
2013-03-26 16:49 ` Stefan Monnier
2013-04-01 13:32 ` Stefan Monnier
2013-04-01 20:43 ` Dmitry Gutov [this message]
2013-04-03 18:25 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5159F170.9020903@yandex.ru \
--to=dgutov@yandex.ru \
--cc=14003-done@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).