From a6be18461471b0889ded6084693664927a041704 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 1 Feb 2021 10:42:22 +0100 Subject: [PATCH] Fix indentation of non-comment HTML with -- in it * lisp/textmodes/sgml-mode.el (sgml-comment-indent-new-line): Only indent as if we're in a comment if syntax-ppss says that we're in a comment (bug#36227). --- lisp/textmodes/sgml-mode.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 3e29f055ece..7051f520b90 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -510,10 +510,12 @@ an optional alist of possible values." (with-no-warnings (defvar v2)) ; free for skeleton (defun sgml-comment-indent-new-line (&optional soft) - (let ((comment-start "-- ") - (comment-start-skip "\\(