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

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

Re: Tab within comments in C/C++ mode


From: Peter Milliken
Subject: Re: Tab within comments in C/C++ mode
Date: Thu, 31 Oct 2002 08:24:17 +1100

One way to possibly handle this is to use tmmofl to turn off cc-mode and
momentarily invoke some other mode (text mode perhaps?) when you venture
into the comments. Or you could just modify the keymapping for the TAB key?
probably other possibilities as well.

Phillip Lord has authored a package that is run as point enters and leaves
different fontification areas. So you could customise it so that as point
entered the comment area, it allowed the use of the TAB key to generate tab
characters and then changed the behaviour of Emacs back to "normal" as point
left the comment area. I use the package all of the time for similar
activities - it is a very cool idea :-)

tmmofl.el can be found at http://www.russet.org.uk/emacs.html

Peter

"Chris Hobbs" <code_wraith@sbcglobal.net> wrote in message
pan.2002.10.30.20.57.30.386335@sbcglobal.net">news:pan.2002.10.30.20.57.30.386335@sbcglobal.net...
> I am looking for a way to allow the tab key while inside comments in C and
> C++ mode. Currently, the mode will not allow a tab (let alone multiple
> tabs) to be placed while in a comment. It seems to insist on formatting
> the contents of the comment. Not really formatting per se, mainly just
> disallowing any format I want to put in there.
>
> Thanks for any help.
>
> - Chris




reply via email to

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