From f247147d1646e1d80068d5d8aaf284707606fe9d Mon Sep 17 00:00:00 2001 From: Ivan Andrus Date: Wed, 23 Sep 2015 09:21:32 -0600 Subject: [PATCH] ; Implement Stefan's feedback on last two commits --- lisp/newcomment.el | 5 ++--- lisp/nxml/nxml-mode.el | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 765e60a5bcf..0c49211869e 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -418,7 +418,6 @@ If UNP is non-nil, unquote nested comment markers." (setq cs (comment-string-strip cs t t)) (setq ce (comment-string-strip ce t t)) (when (and comment-quote-nested - comment-quote-nested-function (> (length ce) 0)) (funcall comment-quote-nested-function cs ce unp))) @@ -427,8 +426,8 @@ If UNP is non-nil, unquote nested comment markers." It expects to be called with the buffer narrowed to a single comment. It is used as a default for `comment-quote-nested-function'. -The arguments CS and CE are regular expressions matching comment -starting and ending delimiters respectively. +The arguments CS and CE are strings matching comment starting and +ending delimiters respectively. If UNP is non-nil, comments are unquoted instead. diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index dc151a3c650..8b0dc9278c5 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -546,8 +546,7 @@ Many aspects this mode can be customized using (setq comment-end-skip "[ \t\r\n]*-->") (make-local-variable 'comment-line-break-function) (setq comment-line-break-function 'nxml-newline-and-indent) - (make-local-variable 'comment-quote-nested-function) - (setq comment-quote-nested-function 'nxml-comment-quote-nested) + (setq-local comment-quote-nested-function 'nxml-comment-quote-nested) (use-local-map nxml-mode-map) (save-excursion (save-restriction -- 2.11.4.GIT