unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fill for // style comments in C
@ 2006-11-18  0:09 Lennart Borgman
  2006-11-18  0:29 ` Miles Bader
  0 siblings, 1 reply; 23+ messages in thread
From: Lennart Borgman @ 2006-11-18  0:09 UTC (permalink / raw)


Is fill for // style comments in C broken?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-18  0:09 Fill for // style comments in C Lennart Borgman
@ 2006-11-18  0:29 ` Miles Bader
  2006-11-19 12:47   ` Richard Stallman
  2006-11-27  2:34   ` Richard Stallman
  0 siblings, 2 replies; 23+ messages in thread
From: Miles Bader @ 2006-11-18  0:29 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> Is fill for // style comments in C broken?

It seems to work well in c++-mode.  Since // comments are not part of
pre-C99 dialects of C, perhaps c-mode does not (by default) support such
comments?

-Miles
-- 
Next to fried food, the South has suffered most from oratory.
  			-- Walter Hines Page

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-18  0:29 ` Miles Bader
@ 2006-11-19 12:47   ` Richard Stallman
  2006-11-27  2:34   ` Richard Stallman
  1 sibling, 0 replies; 23+ messages in thread
From: Richard Stallman @ 2006-11-19 12:47 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel

    It seems to work well in c++-mode.  Since // comments are not part of
    pre-C99 dialects of C, perhaps c-mode does not (by default) support such
    comments?

C mode does support // comments in other ways, so if it doesn't
enable filling of them, I think that is a bug.

Can someone please fix it, then ack?


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-18  0:29 ` Miles Bader
  2006-11-19 12:47   ` Richard Stallman
@ 2006-11-27  2:34   ` Richard Stallman
  2006-11-27  6:07     ` Stefan Monnier
  1 sibling, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2006-11-27  2:34 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel

[I sent this message a week ago but did not get a response.]

    It seems to work well in c++-mode.  Since // comments are not part of
    pre-C99 dialects of C, perhaps c-mode does not (by default) support such
    comments?

C mode does support // comments in other ways, so if it doesn't
enable filling of them, I think that is a bug.

Can someone please fix it, then ack?


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  2:34   ` Richard Stallman
@ 2006-11-27  6:07     ` Stefan Monnier
  2006-11-27  6:34       ` Miles Bader
  2006-11-27  8:45       ` Lennart Borgman
  0 siblings, 2 replies; 23+ messages in thread
From: Stefan Monnier @ 2006-11-27  6:07 UTC (permalink / raw)
  Cc: bug-cc-mode, lennart.borgman.073, emacs-devel, Miles Bader

>     It seems to work well in c++-mode.  Since // comments are not part of
>     pre-C99 dialects of C, perhaps c-mode does not (by default) support such
>     comments?

> C mode does support // comments in other ways, so if it doesn't
> enable filling of them, I think that is a bug.

I still haven't seen any clear report that it doesn't work (just some vague
remarks about whether or not it works).


        Stefan

-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  6:07     ` Stefan Monnier
@ 2006-11-27  6:34       ` Miles Bader
  2006-11-27  7:44         ` Herbert Euler
  2006-11-27  8:45       ` Lennart Borgman
  1 sibling, 1 reply; 23+ messages in thread
From: Miles Bader @ 2006-11-27  6:34 UTC (permalink / raw)
  Cc: bug-cc-mode, lennart.borgman.073, rms, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> C mode does support // comments in other ways, so if it doesn't
>> enable filling of them, I think that is a bug.
>
> I still haven't seen any clear report that it doesn't work (just some vague
> remarks about whether or not it works).

Consider the following in c-mode (with indentation removed):

   // this is a test
   // foo bar
   int a ()
   {
   }

If you position the point on the word "test", and hit M-q (bound to
`c-fill-paragraph'), nothing happens.

If you then do `M-x c++-mode', and hit M-q again, the comment is filled
as you might expect.

_However_ if you use `M-x fill-paragraph' instead of M-q
(c-fill-paragraph), then it works correctly in both modes -- so it
appears that the bug is with c-fill-paragraph.

-Miles

-- 
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over.  --Ian Wolff

-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  6:34       ` Miles Bader
@ 2006-11-27  7:44         ` Herbert Euler
  2006-11-27  9:47           ` martin rudalics
  0 siblings, 1 reply; 23+ messages in thread
From: Herbert Euler @ 2006-11-27  7:44 UTC (permalink / raw)
  Cc: bug-cc-mode, lennart.borgman.073, rms, emacs-devel

And in c-mode, pressing M-q in between comments like this:

// A real long comment that will cause the fill command in Emacs C mode 
making mistakes.

will get

// A real long comment that will cause the fill command in Emacs C
mode making mistakes.

But for /* */ style comment, it will be

/* A real long comment that will cause the fill command in Emacs C
   mode making mistakes. */

And in c++-mode,

// A real long comment that will cause the fill command in Emacs C mode 
making mistakes.

will be changed to

// A real long comment that will cause the fill command in Emacs C
// mode making mistakes.

when pressing M-q.

Regards,
Guanpeng Xu

>From: Miles Bader <miles.bader@necel.com>
>Reply-To: Miles Bader <miles@gnu.org>
>To: Stefan Monnier <monnier@iro.umontreal.ca>
>CC: bug-cc-mode@gnu.org, lennart.borgman.073@student.lu.se, 
>rms@gnu.org,emacs-devel@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Mon, 27 Nov 2006 15:34:28 +0900
>
>Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> C mode does support // comments in other ways, so if it doesn't
> >> enable filling of them, I think that is a bug.
> >
> > I still haven't seen any clear report that it doesn't work (just some 
>vague
> > remarks about whether or not it works).
>
>Consider the following in c-mode (with indentation removed):
>
>    // this is a test
>    // foo bar
>    int a ()
>    {
>    }
>
>If you position the point on the word "test", and hit M-q (bound to
>`c-fill-paragraph'), nothing happens.
>
>If you then do `M-x c++-mode', and hit M-q again, the comment is filled
>as you might expect.
>
>_However_ if you use `M-x fill-paragraph' instead of M-q
>(c-fill-paragraph), then it works correctly in both modes -- so it
>appears that the bug is with c-fill-paragraph.
>
>-Miles
>
>--
>I'm beginning to think that life is just one long Yoko Ono album; no rhyme
>or reason, just a lot of incoherent shrieks and then it's over.  --Ian 
>Wolff
>
>
>_______________________________________________
>Emacs-devel mailing list
>Emacs-devel@gnu.org
>http://lists.gnu.org/mailman/listinfo/emacs-devel

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  6:07     ` Stefan Monnier
  2006-11-27  6:34       ` Miles Bader
@ 2006-11-27  8:45       ` Lennart Borgman
  1 sibling, 0 replies; 23+ messages in thread
From: Lennart Borgman @ 2006-11-27  8:45 UTC (permalink / raw)
  Cc: bug-cc-mode, Miles Bader, rms, emacs-devel

Stefan Monnier wrote:
>>     It seems to work well in c++-mode.  Since // comments are not part of
>>     pre-C99 dialects of C, perhaps c-mode does not (by default) support such
>>     comments?
> 
>> C mode does support // comments in other ways, so if it doesn't
>> enable filling of them, I think that is a bug.
> 
> I still haven't seen any clear report that it doesn't work (just some vague
> remarks about whether or not it works).


Uh? I reported this long ago now. What more could I say than that it 
does not work?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  7:44         ` Herbert Euler
@ 2006-11-27  9:47           ` martin rudalics
  2006-11-27 13:15             ` Herbert Euler
                               ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: martin rudalics @ 2006-11-27  9:47 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	miles

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

 > And in c-mode, pressing M-q in between comments like this:
 >
 > // A real long comment that will cause the fill command in Emacs C mode
 > making mistakes.
 >
 > will get
 >
 > // A real long comment that will cause the fill command in Emacs C
 > mode making mistakes.

It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
`comment-end' set to " */" instead of nil.  Does the attached workaround
remove the problem?

[-- Attachment #2: cc-cmds.patch --]
[-- Type: text/plain, Size: 636 bytes --]

*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
--- progmodes/cc-cmds.el	Mon Nov 27 10:33:20 2006
***************
*** 3897,3903 ****
  	      (prog1
  		  (save-restriction
  		    (narrow-to-region beg end)
! 		    (apply fun args))
  		(if point-rel
  		    ;; Restore point if it was outside the region.
  		    (if (< point-rel 0)
--- 3897,3905 ----
  	      (prog1
  		  (save-restriction
  		    (narrow-to-region beg end)
! 		    (if (eq c-lit-type 'c++)
! 			(apply 'fill-comment-paragraph args)
! 		      (apply fun args)))
  		(if point-rel
  		    ;; Restore point if it was outside the region.
  		    (if (< point-rel 0)

[-- Attachment #3: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  9:47           ` martin rudalics
@ 2006-11-27 13:15             ` Herbert Euler
  2006-11-28  2:32             ` Miles Bader
  2006-11-28  8:20             ` Herbert Euler
  2 siblings, 0 replies; 23+ messages in thread
From: Herbert Euler @ 2006-11-27 13:15 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	miles

Yes, it works.  Thank you.

Regards,
Guanpeng Xu


>From: martin rudalics <rudalics@gmx.at>
>To: Herbert Euler <herberteuler@hotmail.com>
>CC: miles@gnu.org,  monnier@iro.umontreal.ca,  bug-cc-mode@gnu.org,  
>lennart.borgman.073@student.lu.se,  rms@gnu.org,  emacs-devel@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Mon, 27 Nov 2006 10:47:29 +0100
>
> > And in c-mode, pressing M-q in between comments like this:
> >
> > // A real long comment that will cause the fill command in Emacs C mode
> > making mistakes.
> >
> > will get
> >
> > // A real long comment that will cause the fill command in Emacs C
> > mode making mistakes.
>
>It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
>calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
>`comment-end' set to " */" instead of nil.  Does the attached workaround
>remove the problem?


>*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
>--- progmodes/cc-cmds.el	Mon Nov 27 10:33:20 2006
>***************
>*** 3897,3903 ****
>   	      (prog1
>   		  (save-restriction
>   		    (narrow-to-region beg end)
>! 		    (apply fun args))
>   		(if point-rel
>   		    ;; Restore point if it was outside the region.
>   		    (if (< point-rel 0)
>--- 3897,3905 ----
>   	      (prog1
>   		  (save-restriction
>   		    (narrow-to-region beg end)
>! 		    (if (eq c-lit-type 'c++)
>! 			(apply 'fill-comment-paragraph args)
>! 		      (apply fun args)))
>   		(if point-rel
>   		    ;; Restore point if it was outside the region.
>   		    (if (< point-rel 0)

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  9:47           ` martin rudalics
  2006-11-27 13:15             ` Herbert Euler
@ 2006-11-28  2:32             ` Miles Bader
  2006-11-28  5:19               ` Herbert Euler
  2006-11-28 21:41               ` martin rudalics
  2006-11-28  8:20             ` Herbert Euler
  2 siblings, 2 replies; 23+ messages in thread
From: Miles Bader @ 2006-11-28  2:32 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	Herbert Euler

martin rudalics <rudalics@gmx.at> writes:
> It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
> calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
> `comment-end' set to " */" instead of nil.  Does the attached workaround
> remove the problem?

I tried this patch, and it does indeed seem to fix the filling problem
-- but it has a serious side-effect:  with this patch applied, the SPC
key (bound to self-insert-command) no longer works!  [There's no error
or anything, but no spaces get inserted when you type SPC.]

-Miles
-- 
The car has become... an article of dress without which we feel uncertain,
unclad, and incomplete.  [Marshall McLuhan, Understanding Media, 1964]

-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28  2:32             ` Miles Bader
@ 2006-11-28  5:19               ` Herbert Euler
  2006-11-28  5:58                 ` Miles Bader
  2006-11-28 21:41               ` martin rudalics
  1 sibling, 1 reply; 23+ messages in thread
From: Herbert Euler @ 2006-11-28  5:19 UTC (permalink / raw)
  Cc: bug-cc-mode, lennart.borgman.073, emacs-devel, monnier, rms

Strange.  I tried typing SPC, and spaces were inserted.
Where did you put the point?

Regards,
Guanpeng Xu


>From: Miles Bader <miles.bader@necel.com>
>Reply-To: Miles Bader <miles@gnu.org>
>To: martin rudalics <rudalics@gmx.at>
>CC: Herbert Euler <herberteuler@hotmail.com>, monnier@iro.umontreal.ca,     
>    bug-cc-mode@gnu.org, lennart.borgman.073@student.lu.se, rms@gnu.org,    
>     emacs-devel@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Tue, 28 Nov 2006 11:32:52 +0900
>
>martin rudalics <rudalics@gmx.at> writes:
> > It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
> > calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
> > `comment-end' set to " */" instead of nil.  Does the attached workaround
> > remove the problem?
>
>I tried this patch, and it does indeed seem to fix the filling problem
>-- but it has a serious side-effect:  with this patch applied, the SPC
>key (bound to self-insert-command) no longer works!  [There's no error
>or anything, but no spaces get inserted when you type SPC.]
>
>-Miles
>--
>The car has become... an article of dress without which we feel uncertain,
>unclad, and incomplete.  [Marshall McLuhan, Understanding Media, 1964]

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28  5:19               ` Herbert Euler
@ 2006-11-28  5:58                 ` Miles Bader
  2006-11-28  6:27                   ` Herbert Euler
  0 siblings, 1 reply; 23+ messages in thread
From: Miles Bader @ 2006-11-28  5:58 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, rudalics,
	monnier

"Herbert Euler" <herberteuler@hotmail.com> writes:
> Strange.  I tried typing SPC, and spaces were inserted.
> Where did you put the point?

For instance in the following short program:

   //
   int a ()
   {
   }

Also I have "auto-fill-mode" turned on -- that seems necessary to see
this behavior.

Position point after the "//" and try to type SPC -- for me, it simply
does nothing.  In other situations, SPC actually causes the comment to
be filled (even though it's nowhere near the margin where auto-filling
would normally do something).

-Miles

-- 
We have met the enemy, and he is us.  -- Pogo

-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28  5:58                 ` Miles Bader
@ 2006-11-28  6:27                   ` Herbert Euler
  0 siblings, 0 replies; 23+ messages in thread
From: Herbert Euler @ 2006-11-28  6:27 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, rudalics,
	monnier

I see.  But turning off auto-fill-mode makes spaces get
inserted when pressing SPC.

Regards,
Guanpeng Xu


>From: Miles Bader <miles.bader@necel.com>
>Reply-To: Miles Bader <miles@gnu.org>
>To: "Herbert Euler" <herberteuler@hotmail.com>
>CC: rudalics@gmx.at, bug-cc-mode@gnu.org, 
>lennart.borgman.073@student.lu.se,        emacs-devel@gnu.org, 
>monnier@iro.umontreal.ca, rms@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Tue, 28 Nov 2006 14:58:22 +0900
>
>"Herbert Euler" <herberteuler@hotmail.com> writes:
> > Strange.  I tried typing SPC, and spaces were inserted.
> > Where did you put the point?
>
>For instance in the following short program:
>
>    //
>    int a ()
>    {
>    }
>
>Also I have "auto-fill-mode" turned on -- that seems necessary to see
>this behavior.
>
>Position point after the "//" and try to type SPC -- for me, it simply
>does nothing.  In other situations, SPC actually causes the comment to
>be filled (even though it's nowhere near the margin where auto-filling
>would normally do something).
>
>-Miles
>
>--
>We have met the enemy, and he is us.  -- Pogo

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-27  9:47           ` martin rudalics
  2006-11-27 13:15             ` Herbert Euler
  2006-11-28  2:32             ` Miles Bader
@ 2006-11-28  8:20             ` Herbert Euler
  2006-11-28 11:35               ` Herbert Euler
  2 siblings, 1 reply; 23+ messages in thread
From: Herbert Euler @ 2006-11-28  8:20 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	miles

In the orignal code,

    (apply 'fill-paragraph '(nil))

will be called both for c-mode and c++-mode.  And if you
put point in between

// A real long comment that will cause the fill command in Emacs making 
mistakes.

and evaluate

    (apply 'fill-paragraph '(nil))

by pressing M-:, you will see that the comment is refilled
correctly.  CC mode seems doing more than just filling,
but I don't have time to trace now.

Regards,
Guanpeng Xu


>From: martin rudalics <rudalics@gmx.at>
>To: Herbert Euler <herberteuler@hotmail.com>
>CC: miles@gnu.org,  monnier@iro.umontreal.ca,  bug-cc-mode@gnu.org,  
>lennart.borgman.073@student.lu.se,  rms@gnu.org,  emacs-devel@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Mon, 27 Nov 2006 10:47:29 +0100
>
> > And in c-mode, pressing M-q in between comments like this:
> >
> > // A real long comment that will cause the fill command in Emacs C mode
> > making mistakes.
> >
> > will get
> >
> > // A real long comment that will cause the fill command in Emacs C
> > mode making mistakes.
>
>It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
>calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
>`comment-end' set to " */" instead of nil.  Does the attached workaround
>remove the problem?


>*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
>--- progmodes/cc-cmds.el	Mon Nov 27 10:33:20 2006
>***************
>*** 3897,3903 ****
>   	      (prog1
>   		  (save-restriction
>   		    (narrow-to-region beg end)
>! 		    (apply fun args))
>   		(if point-rel
>   		    ;; Restore point if it was outside the region.
>   		    (if (< point-rel 0)
>--- 3897,3905 ----
>   	      (prog1
>   		  (save-restriction
>   		    (narrow-to-region beg end)
>! 		    (if (eq c-lit-type 'c++)
>! 			(apply 'fill-comment-paragraph args)
>! 		      (apply fun args)))
>   		(if point-rel
>   		    ;; Restore point if it was outside the region.
>   		    (if (< point-rel 0)

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28  8:20             ` Herbert Euler
@ 2006-11-28 11:35               ` Herbert Euler
  2006-11-28 12:34                 ` Herbert Euler
  0 siblings, 1 reply; 23+ messages in thread
From: Herbert Euler @ 2006-11-28 11:35 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	miles

I added

    (read-string (format "%s" `(apply ,fun ,args)))

before and after invoking `apply':

    (prog1
      (save-restriction
      (narrow-to-region beg end)
      (read-string (format "%s" `(apply ,fun ,args)))
      (apply fun args)
      (read-string (format "%s" `(apply ,fun ,args))))

And I put the point in between the following comment and
pressed M-q:

// A real long comment that will cause the fill command in Emacs

I saw what is actually called is

    (apply fill-paragraph (nil))

But the behavior of `fill-paragraph' is not the same as when
executing with pressing M-x fill-paragraph RET when the
point is at the same point.

Strange.

Regards,
Guanpeng Xu


>From: "Herbert Euler" <herberteuler@hotmail.com>
>To: rudalics@gmx.at
>CC: rms@gnu.org, lennart.borgman.073@student.lu.se, 
>emacs-devel@gnu.org,bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, 
>miles@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Tue, 28 Nov 2006 16:20:01 +0800
>
>In the orignal code,
>
>    (apply 'fill-paragraph '(nil))
>
>will be called both for c-mode and c++-mode.  And if you
>put point in between
>
>// A real long comment that will cause the fill command in Emacs making 
>mistakes.
>
>and evaluate
>
>    (apply 'fill-paragraph '(nil))
>
>by pressing M-:, you will see that the comment is refilled
>correctly.  CC mode seems doing more than just filling,
>but I don't have time to trace now.
>
>Regards,
>Guanpeng Xu
>
>
>>From: martin rudalics <rudalics@gmx.at>
>>To: Herbert Euler <herberteuler@hotmail.com>
>>CC: miles@gnu.org,  monnier@iro.umontreal.ca,  bug-cc-mode@gnu.org,  
>>lennart.borgman.073@student.lu.se,  rms@gnu.org,  emacs-devel@gnu.org
>>Subject: Re: Fill for // style comments in C
>>Date: Mon, 27 Nov 2006 10:47:29 +0100
>>
>> > And in c-mode, pressing M-q in between comments like this:
>> >
>> > // A real long comment that will cause the fill command in Emacs C mode
>> > making mistakes.
>> >
>> > will get
>> >
>> > // A real long comment that will cause the fill command in Emacs C
>> > mode making mistakes.
>>
>>It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
>>calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
>>`comment-end' set to " */" instead of nil.  Does the attached workaround
>>remove the problem?
>
>
>>*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
>>--- progmodes/cc-cmds.el	Mon Nov 27 10:33:20 2006
>>***************
>>*** 3897,3903 ****
>>   	      (prog1
>>   		  (save-restriction
>>   		    (narrow-to-region beg end)
>>! 		    (apply fun args))
>>   		(if point-rel
>>   		    ;; Restore point if it was outside the region.
>>   		    (if (< point-rel 0)
>>--- 3897,3905 ----
>>   	      (prog1
>>   		  (save-restriction
>>   		    (narrow-to-region beg end)
>>! 		    (if (eq c-lit-type 'c++)
>>! 			(apply 'fill-comment-paragraph args)
>>! 		      (apply fun args)))
>>   		(if point-rel
>>   		    ;; Restore point if it was outside the region.
>>   		    (if (< point-rel 0)
>
>_________________________________________________________________
>Don't just search. Find. Check out the new MSN Search! 
>http://search.msn.com/
>
>
>
>_______________________________________________
>Emacs-devel mailing list
>Emacs-devel@gnu.org
>http://lists.gnu.org/mailman/listinfo/emacs-devel

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28 11:35               ` Herbert Euler
@ 2006-11-28 12:34                 ` Herbert Euler
  2006-11-28 14:13                   ` Herbert Euler
  0 siblings, 1 reply; 23+ messages in thread
From: Herbert Euler @ 2006-11-28 12:34 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	miles

How about this?

*** cc-cmds.el.origal   Tue Nov 28 20:31:16 2006
--- cc-cmds.el  Tue Nov 28 20:30:53 2006
*************** (defun c-mask-paragraph (fill-paragraph
*** 3897,3903 ****
              (prog1
                  (save-restriction
                    (narrow-to-region beg end)
!                   (apply fun args))
                (if point-rel
                    ;; Restore point if it was outside the region.
                    (if (< point-rel 0)
--- 3897,3911 ----
              (prog1
                  (save-restriction
                    (narrow-to-region beg end)
!                   (let* ((comment-start (save-excursion
!                                           (goto-char (point-min))
!                                           (if (looking-at "//")
!                                               "//"
!                                             comment-start)))
!                          (comment-end (if (string= comment-start "//")
!                                           ""
!                                         comment-end)))
!                     (apply fun args)))
                (if point-rel
                    ;; Restore point if it was outside the region.
                    (if (< point-rel 0)

Regards,
Guanpeng Xu


>From: "Herbert Euler" <herberteuler@hotmail.com>
>To: herberteuler@hotmail.com, rudalics@gmx.at
>CC: rms@gnu.org, lennart.borgman.073@student.lu.se, emacs-devel@gnu.org, 
>bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, miles@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Tue, 28 Nov 2006 19:35:59 +0800
>
>I added
>
>    (read-string (format "%s" `(apply ,fun ,args)))
>
>before and after invoking `apply':
>
>    (prog1
>      (save-restriction
>      (narrow-to-region beg end)
>      (read-string (format "%s" `(apply ,fun ,args)))
>      (apply fun args)
>      (read-string (format "%s" `(apply ,fun ,args))))
>
>And I put the point in between the following comment and
>pressed M-q:
>
>// A real long comment that will cause the fill command in Emacs
>
>I saw what is actually called is
>
>    (apply fill-paragraph (nil))
>
>But the behavior of `fill-paragraph' is not the same as when
>executing with pressing M-x fill-paragraph RET when the
>point is at the same point.
>
>Strange.
>
>Regards,
>Guanpeng Xu
>
>
>>From: "Herbert Euler" <herberteuler@hotmail.com>
>>To: rudalics@gmx.at
>>CC: rms@gnu.org, lennart.borgman.073@student.lu.se, 
>>emacs-devel@gnu.org,bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, 
>>miles@gnu.org
>>Subject: Re: Fill for // style comments in C
>>Date: Tue, 28 Nov 2006 16:20:01 +0800
>>
>>In the orignal code,
>>
>>    (apply 'fill-paragraph '(nil))
>>
>>will be called both for c-mode and c++-mode.  And if you
>>put point in between
>>
>>// A real long comment that will cause the fill command in Emacs making 
>>mistakes.
>>
>>and evaluate
>>
>>    (apply 'fill-paragraph '(nil))
>>
>>by pressing M-:, you will see that the comment is refilled
>>correctly.  CC mode seems doing more than just filling,
>>but I don't have time to trace now.
>>
>>Regards,
>>Guanpeng Xu
>>
>>
>>>From: martin rudalics <rudalics@gmx.at>
>>>To: Herbert Euler <herberteuler@hotmail.com>
>>>CC: miles@gnu.org,  monnier@iro.umontreal.ca,  bug-cc-mode@gnu.org,  
>>>lennart.borgman.073@student.lu.se,  rms@gnu.org,  emacs-devel@gnu.org
>>>Subject: Re: Fill for // style comments in C
>>>Date: Mon, 27 Nov 2006 10:47:29 +0100
>>>
>>> > And in c-mode, pressing M-q in between comments like this:
>>> >
>>> > // A real long comment that will cause the fill command in Emacs C 
>>>mode
>>> > making mistakes.
>>> >
>>> > will get
>>> >
>>> > // A real long comment that will cause the fill command in Emacs C
>>> > mode making mistakes.
>>>
>>>It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
>>>calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
>>>`comment-end' set to " */" instead of nil.  Does the attached workaround
>>>remove the problem?
>>
>>
>>>*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
>>>--- progmodes/cc-cmds.el	Mon Nov 27 10:33:20 2006
>>>***************
>>>*** 3897,3903 ****
>>>   	      (prog1
>>>   		  (save-restriction
>>>   		    (narrow-to-region beg end)
>>>! 		    (apply fun args))
>>>   		(if point-rel
>>>   		    ;; Restore point if it was outside the region.
>>>   		    (if (< point-rel 0)
>>>--- 3897,3905 ----
>>>   	      (prog1
>>>   		  (save-restriction
>>>   		    (narrow-to-region beg end)
>>>! 		    (if (eq c-lit-type 'c++)
>>>! 			(apply 'fill-comment-paragraph args)
>>>! 		      (apply fun args)))
>>>   		(if point-rel
>>>   		    ;; Restore point if it was outside the region.
>>>   		    (if (< point-rel 0)
>>
>>_________________________________________________________________
>>Don't just search. Find. Check out the new MSN Search! 
>>http://search.msn.com/
>>
>>
>>
>>_______________________________________________
>>Emacs-devel mailing list
>>Emacs-devel@gnu.org
>>http://lists.gnu.org/mailman/listinfo/emacs-devel
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE! 
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28 12:34                 ` Herbert Euler
@ 2006-11-28 14:13                   ` Herbert Euler
  2006-11-28 15:31                     ` Miles Bader
  0 siblings, 1 reply; 23+ messages in thread
From: Herbert Euler @ 2006-11-28 14:13 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	miles

And if what are critical are `comment-start' and `comment-end',
why not making `command-start' and `comment-end' for c-mode
the same as c++-mode?  The two languages support the same
comment styles now.

Regards,
Guanpeng Xu


>From: "Herbert Euler" <herberteuler@hotmail.com>
>To: herberteuler@hotmail.com, rudalics@gmx.at
>CC: rms@gnu.org, lennart.borgman.073@student.lu.se, 
>emacs-devel@gnu.org,bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, 
>miles@gnu.org
>Subject: Re: Fill for // style comments in C
>Date: Tue, 28 Nov 2006 20:34:53 +0800
>
>How about this?
>
>*** cc-cmds.el.origal   Tue Nov 28 20:31:16 2006
>--- cc-cmds.el  Tue Nov 28 20:30:53 2006
>*************** (defun c-mask-paragraph (fill-paragraph
>*** 3897,3903 ****
>              (prog1
>                  (save-restriction
>                    (narrow-to-region beg end)
>!                   (apply fun args))
>                (if point-rel
>                    ;; Restore point if it was outside the region.
>                    (if (< point-rel 0)
>--- 3897,3911 ----
>              (prog1
>                  (save-restriction
>                    (narrow-to-region beg end)
>!                   (let* ((comment-start (save-excursion
>!                                           (goto-char (point-min))
>!                                           (if (looking-at "//")
>!                                               "//"
>!                                             comment-start)))
>!                          (comment-end (if (string= comment-start "//")
>!                                           ""
>!                                         comment-end)))
>!                     (apply fun args)))
>                (if point-rel
>                    ;; Restore point if it was outside the region.
>                    (if (< point-rel 0)
>
>Regards,
>Guanpeng Xu
>
>
>>From: "Herbert Euler" <herberteuler@hotmail.com>
>>To: herberteuler@hotmail.com, rudalics@gmx.at
>>CC: rms@gnu.org, lennart.borgman.073@student.lu.se, emacs-devel@gnu.org, 
>>bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, miles@gnu.org
>>Subject: Re: Fill for // style comments in C
>>Date: Tue, 28 Nov 2006 19:35:59 +0800
>>
>>I added
>>
>>    (read-string (format "%s" `(apply ,fun ,args)))
>>
>>before and after invoking `apply':
>>
>>    (prog1
>>      (save-restriction
>>      (narrow-to-region beg end)
>>      (read-string (format "%s" `(apply ,fun ,args)))
>>      (apply fun args)
>>      (read-string (format "%s" `(apply ,fun ,args))))
>>
>>And I put the point in between the following comment and
>>pressed M-q:
>>
>>// A real long comment that will cause the fill command in Emacs
>>
>>I saw what is actually called is
>>
>>    (apply fill-paragraph (nil))
>>
>>But the behavior of `fill-paragraph' is not the same as when
>>executing with pressing M-x fill-paragraph RET when the
>>point is at the same point.
>>
>>Strange.
>>
>>Regards,
>>Guanpeng Xu
>>
>>
>>>From: "Herbert Euler" <herberteuler@hotmail.com>
>>>To: rudalics@gmx.at
>>>CC: rms@gnu.org, lennart.borgman.073@student.lu.se, 
>>>emacs-devel@gnu.org,bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, 
>>>miles@gnu.org
>>>Subject: Re: Fill for // style comments in C
>>>Date: Tue, 28 Nov 2006 16:20:01 +0800
>>>
>>>In the orignal code,
>>>
>>>    (apply 'fill-paragraph '(nil))
>>>
>>>will be called both for c-mode and c++-mode.  And if you
>>>put point in between
>>>
>>>// A real long comment that will cause the fill command in Emacs making 
>>>mistakes.
>>>
>>>and evaluate
>>>
>>>    (apply 'fill-paragraph '(nil))
>>>
>>>by pressing M-:, you will see that the comment is refilled
>>>correctly.  CC mode seems doing more than just filling,
>>>but I don't have time to trace now.
>>>
>>>Regards,
>>>Guanpeng Xu
>>>
>>>
>>>>From: martin rudalics <rudalics@gmx.at>
>>>>To: Herbert Euler <herberteuler@hotmail.com>
>>>>CC: miles@gnu.org,  monnier@iro.umontreal.ca,  bug-cc-mode@gnu.org,  
>>>>lennart.borgman.073@student.lu.se,  rms@gnu.org,  emacs-devel@gnu.org
>>>>Subject: Re: Fill for // style comments in C
>>>>Date: Mon, 27 Nov 2006 10:47:29 +0100
>>>>
>>>> > And in c-mode, pressing M-q in between comments like this:
>>>> >
>>>> > // A real long comment that will cause the fill command in Emacs C 
>>>>mode
>>>> > making mistakes.
>>>> >
>>>> > will get
>>>> >
>>>> > // A real long comment that will cause the fill command in Emacs C
>>>> > mode making mistakes.
>>>>
>>>>It's because `c-fill-paragraph' calls `c-mask-paragraph' the latter
>>>>calls `fill-paragraph' and `fill-paragraph' gets it wrong since it has
>>>>`comment-end' set to " */" instead of nil.  Does the attached workaround
>>>>remove the problem?
>>>
>>>
>>>>*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
>>>>--- progmodes/cc-cmds.el	Mon Nov 27 10:33:20 2006
>>>>***************
>>>>*** 3897,3903 ****
>>>>   	      (prog1
>>>>   		  (save-restriction
>>>>   		    (narrow-to-region beg end)
>>>>! 		    (apply fun args))
>>>>   		(if point-rel
>>>>   		    ;; Restore point if it was outside the region.
>>>>   		    (if (< point-rel 0)
>>>>--- 3897,3905 ----
>>>>   	      (prog1
>>>>   		  (save-restriction
>>>>   		    (narrow-to-region beg end)
>>>>! 		    (if (eq c-lit-type 'c++)
>>>>! 			(apply 'fill-comment-paragraph args)
>>>>! 		      (apply fun args)))
>>>>   		(if point-rel
>>>>   		    ;; Restore point if it was outside the region.
>>>>   		    (if (< point-rel 0)
>>>
>>>_________________________________________________________________
>>>Don't just search. Find. Check out the new MSN Search! 
>>>http://search.msn.com/
>>>
>>>
>>>
>>>_______________________________________________
>>>Emacs-devel mailing list
>>>Emacs-devel@gnu.org
>>>http://lists.gnu.org/mailman/listinfo/emacs-devel
>>
>>_________________________________________________________________
>>Express yourself instantly with MSN Messenger! Download today it's FREE! 
>>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>
>
>_________________________________________________________________
>Don't just search. Find. Check out the new MSN Search! 
>http://search.msn.com/
>
>
>
>_______________________________________________
>Emacs-devel mailing list
>Emacs-devel@gnu.org
>http://lists.gnu.org/mailman/listinfo/emacs-devel

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28 14:13                   ` Herbert Euler
@ 2006-11-28 15:31                     ` Miles Bader
  2006-11-29  3:29                       ` Richard Stallman
  0 siblings, 1 reply; 23+ messages in thread
From: Miles Bader @ 2006-11-28 15:31 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, rudalics,
	monnier

"Herbert Euler" <herberteuler@hotmail.com> writes:
> And if what are critical are `comment-start' and `comment-end',
> why not making `command-start' and `comment-end' for c-mode
> the same as c++-mode?

That would cause c-mode to _insert_ new-style comments in certain
situations (i.e., M-;), which is not good, I think -- while it's great
if c-mode always _recognizes_ new-style comments, old-style comments
should still be the default in c-mode for those situations where a
choice must be made.

-Miles

-- 
My spirit felt washed.  With blood.  [Eli Shin, on "The Passion of the Christ"]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28  2:32             ` Miles Bader
  2006-11-28  5:19               ` Herbert Euler
@ 2006-11-28 21:41               ` martin rudalics
  2006-11-29 16:26                 ` Richard Stallman
  1 sibling, 1 reply; 23+ messages in thread
From: martin rudalics @ 2006-11-28 21:41 UTC (permalink / raw)
  Cc: rms, lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	Herbert Euler

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

 > I tried this patch, and it does indeed seem to fix the filling problem
 > -- but it has a serious side-effect:  with this patch applied, the SPC
 > key (bound to self-insert-command) no longer works!  [There's no error
 > or anything, but no spaces get inserted when you type SPC.]

Sorry.  I did experiment with auto-filling but failed to see that it
swallowed the spaces.  Please try the attached patch instead.

But we should probably wait for Alan to comment on this.

[-- Attachment #2: cc-cmds.patch --]
[-- Type: text/plain, Size: 648 bytes --]

*** progmodes/cc-cmds.el	Mon Nov 27 10:32:48 2006
--- progmodes/cc-cmds.el	Tue Nov 28 22:29:14 2006
***************
*** 3897,3903 ****
  	      (prog1
  		  (save-restriction
  		    (narrow-to-region beg end)
! 		    (apply fun args))
  		(if point-rel
  		    ;; Restore point if it was outside the region.
  		    (if (< point-rel 0)
--- 3897,3906 ----
  	      (prog1
  		  (save-restriction
  		    (narrow-to-region beg end)
! 		    (if (eq c-lit-type 'c++)
! 			(let ((comment-end ""))
! 			  (apply fun args))
! 		      (apply fun args)))
  		(if point-rel
  		    ;; Restore point if it was outside the region.
  		    (if (< point-rel 0)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28 15:31                     ` Miles Bader
@ 2006-11-29  3:29                       ` Richard Stallman
  0 siblings, 0 replies; 23+ messages in thread
From: Richard Stallman @ 2006-11-29  3:29 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel, bug-cc-mode, rudalics, monnier,
	herberteuler

    That would cause c-mode to _insert_ new-style comments in certain
    situations (i.e., M-;), which is not good, I think -- while it's great
    if c-mode always _recognizes_ new-style comments, old-style comments
    should still be the default in c-mode for those situations where a
    choice must be made.

I agree.

Can someone implement this behavior?

-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-28 21:41               ` martin rudalics
@ 2006-11-29 16:26                 ` Richard Stallman
  2006-11-29 18:21                   ` Stefan Monnier
  0 siblings, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2006-11-29 16:26 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel, bug-cc-mode, monnier,
	herberteuler, miles

    Sorry.  I did experiment with auto-filling but failed to see that it
    swallowed the spaces.  Please try the attached patch instead.

    But we should probably wait for Alan to comment on this.

We would value his expertise, but lately he seems to have been to
busy.  We shouldn't wait more than a week for him to comment, not now.

If he wants to speak up later, and solve this a different way, he could
still do so.



-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Fill for // style comments in C
  2006-11-29 16:26                 ` Richard Stallman
@ 2006-11-29 18:21                   ` Stefan Monnier
  0 siblings, 0 replies; 23+ messages in thread
From: Stefan Monnier @ 2006-11-29 18:21 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel, bug-cc-mode, martin rudalics,
	herberteuler, miles

>     Sorry.  I did experiment with auto-filling but failed to see that it
>     swallowed the spaces.  Please try the attached patch instead.
>     But we should probably wait for Alan to comment on this.

> We would value his expertise, but lately he seems to have been to
> busy.  We shouldn't wait more than a week for him to comment, not now.

> If he wants to speak up later, and solve this a different way, he could
> still do so.

Agreed, but please, please, pretty please, if you commit a patch, make sure
the changed code contains a very clear comment explaining what it is trying
to fix, including a small recipe and/or URL to the relevant thread.


        Stefan

-------------------------------------------------------------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2006-11-29 18:21 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-18  0:09 Fill for // style comments in C Lennart Borgman
2006-11-18  0:29 ` Miles Bader
2006-11-19 12:47   ` Richard Stallman
2006-11-27  2:34   ` Richard Stallman
2006-11-27  6:07     ` Stefan Monnier
2006-11-27  6:34       ` Miles Bader
2006-11-27  7:44         ` Herbert Euler
2006-11-27  9:47           ` martin rudalics
2006-11-27 13:15             ` Herbert Euler
2006-11-28  2:32             ` Miles Bader
2006-11-28  5:19               ` Herbert Euler
2006-11-28  5:58                 ` Miles Bader
2006-11-28  6:27                   ` Herbert Euler
2006-11-28 21:41               ` martin rudalics
2006-11-29 16:26                 ` Richard Stallman
2006-11-29 18:21                   ` Stefan Monnier
2006-11-28  8:20             ` Herbert Euler
2006-11-28 11:35               ` Herbert Euler
2006-11-28 12:34                 ` Herbert Euler
2006-11-28 14:13                   ` Herbert Euler
2006-11-28 15:31                     ` Miles Bader
2006-11-29  3:29                       ` Richard Stallman
2006-11-27  8:45       ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).