From c52e9f0b084f4be8b1babb2e662c5277f1a9f687 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 Jan 1995 07:46:16 +0000 Subject: [PATCH] (indent-new-comment-line): Obey the convention about \(...\) pairs in comment-start-skip. --- lisp/simple.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 8c946eb31b6..c958736834f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2316,8 +2316,13 @@ unless optional argument SOFT is non-nil." (setq win (match-beginning 0))) ;; Indent this line like what we found. (goto-char win) + ;; If comment-start-skip contains a \(...\) pair, + ;; the real comment delimiter starts at the end of that pair. + (if (match-end 1) + (goto-char (match-end 1))) (setq comcol (current-column)) - (setq comstart (buffer-substring (point) (match-end 0))))))) + (setq comstart + (buffer-substring (point) (match-end 0))))))) (if comcol (let ((comment-column comcol) (comment-start comstart) -- 2.39.5