0

The default indentation style in emacs for a multi-line list is as follows:

longFunctionName(arg1, arg2, arg3,
                 arg4)

where the final argument snaps to the starting position of the first argument.

How do I adjust this default indentation style (ie. what do I put in my .emacs) to make the second line snap to some increment of tabbing? I want the final result to look like:

longFunctionName(arg1, arg2, arg3,
    arg4)
2
  • Which language?
    – Dan
    Aug 11, 2015 at 1:27
  • Java - is there no generic solution though? Aug 11, 2015 at 17:37

1 Answer 1

1

Solved. Looks like the relevant attribute I was looking for was arglist-cont-nonempty. Added this to my .emacs file:

;; adjust open list indentation
(add-hook 'java-mode-hook
          (lambda ()
            (c-set-offset 'arglist-cont-nonempty 8)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.