Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!tektronix!reed!ogccse!littlei!omepd!mipos3!nate From: nate@hobbes.intel.com (Nate Hess) Newsgroups: gnu.emacs.bug Subject: Small problem with indentation in C-mode Keywords: white space after parens Message-ID: <3612@mipos3.intel.com> Date: 22 Feb 89 19:28:22 GMT Sender: news@mipos3.intel.com Reply-To: woodstock@hobbes.intel.com (Nate Hess) Organization: Intel Corporation, Santa Clara, CA Lines: 44 Posting-Front-End: Gnews 2.0 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