From: Martin Stjernholm Date: Mon, 22 Apr 2002 22:35:45 +0000 (+0000) Subject: (c-mask-comment): Fixed bug where point was moved to the following line when X-Git-Tag: ttn-vms-21-2-B4~15475 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=477feba7985e30a1d54be7ac61ec26f683a31448;p=emacs.git (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. --- 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.