changeset 44755:52388a234829

(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.
author Martin Stjernholm <mast@lysator.liu.se>
date Mon, 22 Apr 2002 22:35:45 +0000
parents 628a697e2315
children 56b4ca0725c1
files lisp/progmodes/cc-cmds.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-cmds.el	Mon Apr 22 22:33:36 2002 +0000
+++ b/lisp/progmodes/cc-cmds.el	Mon Apr 22 22:35:45 2002 +0000
@@ -2900,7 +2900,8 @@
 	      ;; 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.