]> git.eshelyaron.com Git - emacs.git/commitdiff
(c-mask-comment): Fixed bug where point was moved to the following line when
authorMartin Stjernholm <mast@lysator.liu.se>
Mon, 22 Apr 2002 22:35:45 +0000 (22:35 +0000)
committerMartin Stjernholm <mast@lysator.liu.se>
Mon, 22 Apr 2002 22:35:45 +0000 (22:35 +0000)
it was at the first line of a block comment where comment-start-skip matched
to eol.

lisp/progmodes/cc-cmds.el

index d56000049dcffe779a7cd3c1218f4c92ec296b4a..7c63b5fc7b4da056646622e2052bbbc980d30b09 100644 (file)
@@ -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.