From 34cfe69af117066e9263fca6b15aa9014b66dab2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 May 2025 13:11:22 +0300 Subject: [PATCH] Fix indentation of XML comments * lisp/nxml/nxml-mode.el (nxml-compute-indent-in-delimited-token): Fix indentation in XML comments with empty lines. Patch by John Ciolfi . (Bug#73206) (cherry picked from commit 0d493864cee2ea1d7661d51b973db58667b6b65b) --- lisp/nxml/nxml-mode.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index 1f2c7e81a09..ae27824fdc9 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -1523,6 +1523,8 @@ of the line. This expects the xmltok-* variables to be set up as by ((progn (goto-char pos) (forward-line -1) + (while (looking-at "^[[:blank:]]*$") + (forward-line -1)) (<= (point) xmltok-start)) (goto-char (+ xmltok-start (length open-delim))) (when (and (string= open-delim "