bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [address@hidden: quotes in sgml mode]


From: Stefan Monnier
Subject: Re: [address@hidden: quotes in sgml mode]
Date: Wed, 04 Sep 2002 12:20:20 -0400

> I pasted some XML code including the following in my
> *scratch* buffer:
> 
> 
> <PUNC key="double-quote">
> 
> "
> 
> </PUNC>
> 
> <BAR cat="N" tree="hidden">
> 
> <HEAD cat="N" tool="no" gender="masc" number="sin"
> lexeme="machin" ortho="machin" colorGrammLex="Nom">
> 
> machin
> 
> </HEAD>
> 
> <PUNC key="double-quote">
> 
> "
> 
> </PUNC>
> 
> Then I switched to sgml mode with Esc-x sgml-m tab enter.

> The pasted stuff describes a text which contains quotes; the two quotes on
> separate lines are not quotes within sgml tags, but come from the text which
> is being described. So whatever is between them should NOT appear in brown
> like the "double-quote" on the first line. However everything from the 3rd
> to the 9th line is brown (well inverted: that which should be brown is black,
> and that which should be another colour is brown).

Yes, it's a known bug.  Emacs' syntax-tables are not flexible enough
to describe the syntax of sgml and xml.  While it is not impossible
to fix, it's a lot of work and risks slowing down operations significantly,

Many major modes have similar limitations, sadly.

The latest sgml-mode (in the development code of Emacs) has been improved
in some respect, but not this one.

So I suggest you either use &quot; or you use a hack like

        "  <!--"-->

to fool Emacs.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]