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

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

Re: cc-mode indent, exception for long lines


From: maierh
Subject: Re: cc-mode indent, exception for long lines
Date: Fri, 18 Oct 2002 19:33:18 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.91 (i386-mingw-nt5.0.2195)

Matt Armstrong <matt@lickey.com> writes:

> I like to keep my C code lines to 80 columns, for easier
> editing/printing.
>
> But, sometimes I have a long string constant or identifier, and
> cc-mode's indentation isn't optimal.  E.g.
>
>     if (ReallyLongFunctionName(AnotherReallyLongFunctionName("a really long 
> string constant") 
>     {
>     }
>
> I haven't been able to get cc-mode to help me much here.  It'd be great
> if it had a way to sense that the result of an indentation will go
> beyond N columns and go into an alternate mode that results in something
> like this:
>
>     if (ReallyLongFunctionName(
>                 AnotherReallyLongFunctionName(
>                     "a really long string constant") 
>     {
>     }

I am using this. Looks closely to your example:

  ;; (c-set-offset 'arglist-intro '+)

  if (ReallyLongFunctionName(
        AnotherReallyLongFunctionName(
          "a really long string constant") 
        {
        }
                             


reply via email to

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