unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* change function assignment
@ 2004-10-24  9:31 Uwe Mayer
  2004-10-24 23:21 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Mayer @ 2004-10-24  9:31 UTC (permalink / raw)


Hi,

I use emacs for C++ programming. The c-mode provides a nice 'comment-box'
function like this:

/***********/
/* text    */
/***********/

but in c++-mode this changes to:

///////////////
// text      //
///////////////

I know (a little) about the c++-mode-hook customisation, but could someone
please tell me how to bind the comment-box function from c-mode to the
c++-mode identifier comment-box?

Thanks,
Ciao
Uwe

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

* Re: change function assignment
  2004-10-24  9:31 change function assignment Uwe Mayer
@ 2004-10-24 23:21 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2004-10-24 23:21 UTC (permalink / raw)


> I use emacs for C++ programming. The c-mode provides a nice 'comment-box'
> function like this:

> /***********/
> /* text    */
> /***********/

> but in c++-mode this changes to:

> ///////////////
> // text      //
> ///////////////

`comment-box' is (as the name implies) non-specific to C or C++.
It uses comment-start and comment-end to decide what comment markers to use.
So you can just change your C++ mode to use /* and */ for comment-start and
comment-end.


        Stefan

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

end of thread, other threads:[~2004-10-24 23:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-24  9:31 change function assignment Uwe Mayer
2004-10-24 23:21 ` Stefan Monnier

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