nate@hobbes.intel.com (Nate Hess) (02/23/89)
GNU Emacs 18.52.3 of Tue Feb 21 1989 on hobbes (berkeley-unix)
I have encountered a problem with the way C code is indented with
c-mode: white space after an open parenthesis is ignored on
continuation lines.
For example, GNU Emacs formats like this:
if ( some-long-variable-name != foobar-googar-gnip-gnop &&
i < GONZO_MAX_VALUE )
where I would rather have:
if ( some-long-variable-name != foobar-googar-gnip-gnop &&
i < GONZO_MAX_VALUE )
After hunting through the indentation code, I found that this behaviour
can be changed with one line of code:
*** c-mode.el.orig Fri May 27 18:28:12 1988
--- c-mode.el Tue Feb 21 19:27:31 1989
***************
*** 390,395 ****
--- 390,398 ----
;; line is expression, not statement:
;; indent to just after the surrounding open.
(goto-char (1+ containing-sexp))
+ ;; Added 02/21/89 by Nathan Hess (nate@hobbes.intel.com)
+ ;; This indents past any white space after an open paren.
+ (skip-chars-forward " \t")
(current-column))
(t
;; Statement level. Is it a continuation or a new statement?
--woodstock
--
"What I like is when you're looking and thinking and looking
and thinking...and suddenly you wake up." - Hobbes
woodstock@hobbes.intel.com ...!{decwrl|hplabs!oliveb|amd}!intelca!mipos3!nate