From 477feba7985e30a1d54be7ac61ec26f683a31448 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Mon, 22 Apr 2002 22:35:45 +0000 Subject: [PATCH] (c-mask-comment): Fixed bug where point was moved to the following line when it was at the first line of a block comment where comment-start-skip matched to eol. --- lisp/progmodes/cc-cmds.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index d56000049dc..7c63b5fc7b4 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -2900,7 +2900,8 @@ command to conveniently insert and align the necessary backslashes." ;; The region includes the comment starter. (save-excursion (goto-char (car c-lit-limits)) - (if (looking-at (concat "\\(" comment-start-skip "\\)$")) + (if (and (looking-at (concat "\\(" comment-start-skip "\\)$")) + (> here (match-end 0))) ;; Begin with the next line. (setq beg (c-point 'bonl)) ;; Fake the fill prefix in the first line. -- 2.39.2