unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Matt Armstrong <matt@lickey.com>
Subject: cc-mode indent, exception for long lines
Date: Tue, 15 Oct 2002 15:09:34 -0600	[thread overview]
Message-ID: <slrnaqp10e.duc.matt@squeaker.lickey.com> (raw)

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") 
    {
    }

(the above indentation is the "vim" editor's default indentation -- the
first line after a paren is indented 8 spaces, all subsequent lines 8+4
spaces).

Any tips?

-- 
matt

             reply	other threads:[~2002-10-15 21:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 21:09 Matt Armstrong [this message]
2002-10-18 16:47 ` cc-mode indent, exception for long lines Benjamin Riefenstahl
2002-10-18 17:33 ` maierh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnaqp10e.duc.matt@squeaker.lickey.com \
    --to=matt@lickey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).