help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c-style comments in c++-mode


From: Stefan Monnier
Subject: Re: c-style comments in c++-mode
Date: Tue, 13 Feb 2007 10:11:03 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

> Can we use both style of comments, somehow.

Of course.  You can always insert the other style by hand, for example.

> I mean, instead of replacing c++ mode comments completely, can we assign
> keyboard shortcut for inserting c mode style comments? Or may be some other
> better method to use both styles.

Sure.  Coding it is trivial.  The difficult aspect is to find a convenient
user interface for it.  The difficulty is that it should be more convenient
than doing the edit by hand, which is often pretty simple to do.

Maybe a good feature would be a toggling function that changes the style of
the comment-around-point.  That would be a bit less trivial to code.


        Stefan


> On 2/12/07, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> 
>> >>> What's the quickest way to tell c++-mode to insert c-style comments?
>> >> (add-hook 'c++-mode-hook
>> >>           (lambda () (setq comment-start "/* ") (setq comment-end "
>> */")))
>> > Or with a CC Mode style ...
>> 
>> Probably, but I use too many major modes to be bothered to learn each and
>> every one's new idiosyncratic way to configure it.  Especially since Emacs
>> provides perfectly good generic ways to do that.
>> 
>> 
>> Stefan
>> _______________________________________________
>> help-gnu-emacs mailing list
>> help-gnu-emacs@gnu.org
>> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>> 



> -- 
> Regards
> Ankur Jain

> http://ankurjain.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]