* cc-mode indentation questions
@ 2005-08-24 17:13 Erik Osheim
0 siblings, 0 replies; only message in thread
From: Erik Osheim @ 2005-08-24 17:13 UTC (permalink / raw)
Hello,
I'm struggling with configuring emacs to indent perl code according to
the coding standards at my job. I had been trying to set the
indentation variables and recently found the CC mode manual which
makes it clear that I will probably have to write my own indentation
methods.
I'm not especially good at ELisp, and I'm not an ELisp hacker, so I'd
like some guidance before I embark on this. I'm working with the CPerl
module, which has some problems but is pretty good (and is light years
ahead of the basic perl-mode).
NOTE-- I am not saying that I like these indentation methods, but they
are the ones everyone else has agreed on so I need to try to use them.
I'd like indented code to look like this:
$a = some_method_name(
$a,
$b,
);
another_method_that_takes_a_hash
(
'foo' => 'bar',
'black' => 'white',
);
Whereas currently those indent like this:
$a = some_method_name(
$a,
$b
);
another_method_that takes_a_hash
(
'foo' => 'bar',
'black' => 'white',
);
As I understand it, when I hit TAB on each line, emacs figures out
what to tag that line as (i.e. "arglist-cont-nonempty") and then calls
the appropriate indentation function. If I can figure out which tags
these lines have, I can start experimenting with using various methods
to try to get them to behave properly.
Things I'd like to find out include:
1. Has someone else already done this?
2. How are these examples tagged by the lexer?
3. Which indentation methods get called on each line?
I have been using the CC Manual's section on advanced indentation
(http://www.delorie.com/gnu/docs/emacs/cc-mode_33.html) but I am
mostly lost and not really sure how these lines are being
handled. Furthermore since I'm not very good at ELisp I have not had
much luck writing methods to determine which parts are getting called
where.
Any input would be appreciated. Please cc: me in any reply since I'm
not currently subscribed to this list. Also, if there is a more
appropriate place to post this, let me know.
Thanks,
-- Erik
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-08-24 17:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-24 17:13 cc-mode indentation questions Erik Osheim
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.