GNU bug report logs - #35381
26.2; nxml-mode doesn't fontify attributes in single quotes

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Mon, 22 Apr 2019 16:10:01 UTC

Severity: normal

Tags: confirmed, fixed, patch

Merged with 8203

Found in versions 24.5, 25.0.94, 26.2

Fixed in version 26.3

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 35381 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 35381 <at> debbugs.gnu.org
Subject: Re: bug#35381: 26.2;
 nxml-mode doesn't fontify attributes in single quotes
Date: Wed, 24 Apr 2019 10:52:01 -0400
> Well, I was pretty sure that XML allows both quotes, but just to make
> things definitive, https://www.w3.org/TR/xml/#NT-AttValue:
>
>     [10]    AttValue       ::= '"' ([^<&"] | Reference)* '"'
>                             |  "'" ([^<&'] | Reference)* "'"

Thanks for checking.

> I didn't actually checkout and compile before+after, but I'm pretty sure
> it's [56e1097584], same as Bug#32003.
>
> [56e1097584]: 2016-01-16 15:03:42 -0500
>   lisp/nxml: Use syntax-tables for comments
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=56e1097584c13f2b6db85592769db1c6c36e9419

Ah, yes, that makes sense.

> s/more/equally/, but otherwise yes.  Patching sgml-mode is shorter and
> even fixes Bug#8203 as well.  Still good for emacs-26 I hope, since this
> is for an (nxml-mode) regression in 26.1.

Great, thanks.

> --- a/lisp/textmodes/sgml-mode.el
> +++ b/lisp/textmodes/sgml-mode.el
> @@ -103,7 +103,7 @@ (defcustom sgml-mode-hook nil
>  ;; As long as Emacs's syntax can't be complemented with predicates to context
>  ;; sensitively confirm the syntax of characters, we have to live with this
>  ;; kludgy kind of tradeoff.
> -(defvar sgml-specials '(?\")
> +(defvar sgml-specials '(?\" ?\')
>    "List of characters that have a special meaning for SGML mode.
>  This list is used when first loading the `sgml-mode' library.
>  The supported characters and potential disadvantages are:

I think this "disadvantages" part of the docstring is out of date.
Can you update it while you're at it?

Also, we probably want to mark this var as obsolete.


        Stefan




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

Previous Next


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