Subject: bug#6267: 23.1; invalid XML in nested comments produced by comment-region

From: Stefan Monnier <[email-masked]>
Date: Sat, 19 Sep 2015 00:07:33 -0400

The approach looks fine, thank you.

> +(defvar comment-quote-nested-function #'comment-quote-nested-default
[...]
> +  (when (and comment-quote-nested
> +      comment-quote-nested-function

comment-quote-nested-function will always be a function so it should
never be nil, so there's no need to test it here.

> +The arguments CS and CE are regular expressions matching comment
> +starting and ending delimiters respectively.

AFAICT this is not true.  They're just strings, not regexps.

> +  (make-local-variable 'comment-quote-nested-function)
> +  (setq comment-quote-nested-function 'nxml-comment-quote-nested)

I know the rest of the file doesn't use it, but please in new code use:

     (setq-local comment-quote-nested-function #'nxml-comment-quote-nested)

-- Stefan