Index: lisp/progmodes/cc-cmds.el =================================================================== RCS file: /sources/emacs/emacs/lisp/progmodes/cc-cmds.el,v retrieving revision 1.46 diff -c -r1.46 cc-cmds.el *** lisp/progmodes/cc-cmds.el 3 Dec 2006 00:56:56 -0000 1.46 --- lisp/progmodes/cc-cmds.el 25 Dec 2006 11:23:00 -0000 *************** *** 3707,3715 **** (save-excursion (goto-char (cdr c-lit-limits)) - (setq tmp-post (point-marker)) - (insert ?\n) - (set-marker end (point)) (forward-line -1) ; last line of the comment (if (and (looking-at (concat "[ \t]*\\(\\(" c-current-comment-prefix --- 3707,3712 ---- *************** *** 3750,3756 **** (setq point-rel (and (>= point-rel 0) (- (point) (min point-rel spaces))))) ! (setq point-rel nil))) (if point-rel ;; Point was in the middle of the string we --- 3747,3757 ---- (setq point-rel (and (>= point-rel 0) (- (point) (min point-rel spaces))))) ! (setq point-rel nil)) ! (goto-char (cdr c-lit-limits)) ! (setq tmp-post (point-marker)) ! (insert ?\n) ! (set-marker end (point))) (if point-rel ;; Point was in the middle of the string we Index: lisp/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.10483 diff -C0 -r1.10483 ChangeLog *** lisp/ChangeLog 25 Dec 2006 00:22:49 -0000 1.10483 --- lisp/ChangeLog 25 Dec 2006 11:24:23 -0000 *************** *** 0 **** --- 1,5 ---- + 2006-12-25 Michaël Cadilhac + + * progmodes/cc-cmds.el (c-mask-paragraph): Append the `\n' only after + the `hang-ender-stuck' treatment. +