Subject: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes

From: Stefan Monnier <[email-masked]>
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