From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael@cadilhac.name (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: [Toby.Allsopp@navman.com: auto-fill in c-mode messes up incomplete comments] Date: Mon, 25 Dec 2006 12:25:46 +0100 Organization: Epita/LRDE Message-ID: <87d568b4jp.fsf@lrde.org> References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1208836082==" X-Trace: sea.gmane.org 1167045975 2580 80.91.229.10 (25 Dec 2006 11:26:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Dec 2006 11:26:15 +0000 (UTC) Cc: bug-cc-mode@gnu.org, Toby Allsopp , monnier@IRO.UMontreal.CA, emacs-devel@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Mon Dec 25 12:26:14 2006 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gyny7-0004yF-VY for sf-cc-mode-help@m.gmane.org; Mon, 25 Dec 2006 12:26:12 +0100 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 4E1D0F5DD; Mon, 25 Dec 2006 03:26:11 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1Gyny5-0000K4-Aw for cc-mode-help@lists.sourceforge.net; Mon, 25 Dec 2006 03:26:09 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1Gyny2-0004S1-LN for cc-mode-help@lists.sourceforge.net; Mon, 25 Dec 2006 03:26:09 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Gynxr-0003an-NX for bug-cc-mode@gnu.org; Mon, 25 Dec 2006 06:25:55 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.52) id 1Gynxu-0003FK-Rl for bug-cc-mode@gnu.org; Mon, 25 Dec 2006 06:26:02 -0500 Original-Received: from [80.12.242.26] (helo=smtp20.orange.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gynxt-0003Ev-Nm; Mon, 25 Dec 2006 06:25:58 -0500 Original-Received: from localhost (AMontpellier-157-1-4-228.w86-197.abo.wanadoo.fr [86.197.27.228]) by mwinf2028.orange.fr (SMTP Server) with ESMTP id 3D6DA1C00303; Mon, 25 Dec 2006 12:25:55 +0100 (CET) X-ME-UUID: 20061225112555251.3D6DA1C00303@mwinf2028.orange.fr Original-To: rms@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUWCwUyFQk6JBNLGglQK BVRMiRkHQtwMBZuOCRyRi1iQiZyUUCFNxuIPCKRTC2mVTSpZTqVVS2SW0OYZkixb0qraE/KeU7EcT +4h2bPhVfQkm7hlnDkvZjYqIjrwJnzwqB5+4wZAAAACXBIWXMAAAsTAAALEwEAmpwYAAAACXZwQWc AAAAwAAAAMADO7oxXAAADvUlEQVRIx32Wi5ajIAyGRcCAchErVqu27/+W+wfbs724i3Mcz5n/S0JI wlTbyXrs+zrFEL1zPuIdY7xO6+PBf6u27f4DrFPO3jvoQYRYFoj9CXyu+7ZPEWrXUNM0zpEfgjuY9 RTY1hyg5qUNgMb44Dwiiz5OZ8DCwVCjpdLaGNOVtw+M+Lz+AlNwRAhGSamh1abrtFKmG0DkmL8BhE +GdCNlreChBaO7DpjpIvbv/fr4AnqErhoYF6KI4aPrLIeFQLGj6RO4JWLjtdZ1WQXhvegG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-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on monty-python X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.4 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:4245 gmane.emacs.devel:64243 Archived-At: --===============1208836082== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Transfer-Encoding: quoted-printable Richard Stallman writes: > From: Toby Allsopp > Subject: auto-fill in c-mode messes up incomplete comments > To: emacs-pretest-bug@gnu.org > Cc: emacs-snapshot@packages.debian.org > Date: Tue, 28 Nov 2006 11:48:39 +1300 > >>>From a shell prompt: > > emacs -q /tmp/tmp.c > M-x auto-fill-mode > /* > *=20 > > (That's / * * SPC). > > When typing the final space, the second line gets deleted. Pressing > return instead messes it up differently. This seems to be a problem > with c-mask-paragraph. Toby, does the following fix your problem? --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename=cc-cmds.patch Content-Transfer-Encoding: quoted-printable Index: lisp/progmodes/cc-cmds.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =2D-- lisp/progmodes/cc-cmds.el 25 Dec 2006 11:23:00 -0000 *************** *** 3707,3715 **** =20=20 (save-excursion (goto-char (cdr c-lit-limits)) =2D (setq tmp-post (point-marker)) =2D (insert ?\n) =2D (set-marker end (point)) (forward-line -1) ; last line of the comment (if (and (looking-at (concat "[ \t]*\\(\\(" c-current-comment-prefix =2D-- 3707,3712 ---- *************** *** 3750,3756 **** (setq point-rel (and (>=3D point-rel 0) (- (point) (min point-rel spaces))))) ! (setq point-rel nil))) =20=20 (if point-rel ;; Point was in the middle of the string we =2D-- 3747,3757 ---- (setq point-rel (and (>=3D 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))) =20=20 (if point-rel ;; Point was in the middle of the string we Index: lisp/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =2D-- lisp/ChangeLog 25 Dec 2006 11:24:23 -0000 *************** *** 0 **** =2D-- 1,5 ---- + 2006-12-25 Micha=EBl Cadilhac +=20 + * progmodes/cc-cmds.el (c-mask-paragraph): Append the `\n' only after + the `hang-ender-stuck' treatment. +=20 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks. =2D-=20 /!\ My mail address has changed, please update your files accordingly. | Micha=EBl `Micha' Cadilhac | Pour les 35-40 ans, l'humour = | | Epita/LRDE Promo 2007 | c'est une plus-value. = | | http://michael.cadilhac.name | -- Guillaume L. = | `--JID: michael.cadilhac@gmail.com--' - = --' --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFj7U+UJhDmOfFA3URAmQCAKDI+E1S6XKkLOiH1GdkTBagmsKSCgCgkOi3 IBmMlppix/s/njZK0mwtLyA= =8mgG -----END PGP SIGNATURE----- --==-=-=-- --===============1208836082== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============1208836082==--