From c9805d2356942878e55e92aae5fd1dee756f366b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 21 Sep 2010 15:09:22 +0200 Subject: [PATCH] * lisp/newcomment.el (comment-normalize-vars): Better test validity of comment-end-skip. --- lisp/ChangeLog | 5 +++++ lisp/newcomment.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a411d7e9c72..e69a658cfa6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-09-21 Stefan Monnier + + * newcomment.el (comment-normalize-vars): Better test validity of + comment-end-skip. + 2010-09-19 Stefan Monnier * emacs-lisp/float-sup.el (float-pi): New name for `pi'. diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 5d2da467347..1e40317c9a1 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -318,7 +318,8 @@ the variables are properly set." "+\\)[ \t]*"))) (unless (and comment-end-skip ;; In case comment-end has changed since last time. - (string-match comment-end-skip comment-end)) + (string-match comment-end-skip + (if (string= "" comment-end) "\n" comment-end))) (let ((ce (if (string= "" comment-end) "\n" (comment-string-strip comment-end t t)))) (set (make-local-variable 'comment-end-skip) -- 2.39.2