Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site topaz.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!columbia!topaz!vijay From: vijay@topaz.ARPA (P. Vijay) Newsgroups: net.emacs Subject: Re: new c mode Message-ID: <2835@topaz.ARPA> Date: Sun, 21-Jul-85 01:13:35 EDT Article-I.D.: topaz.2835 Posted: Sun Jul 21 01:13:35 1985 Date-Received: Mon, 22-Jul-85 04:20:25 EDT References: <4743@mit-eddie.UUCP> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 31 That was a much needed fix. I just tried it out and found that it doesn't work in the case of a mis-indented 'else' followed by a left brace '{'. So, here is the fix that you need to put in the function electric-c-brace (the diff is a context diff of Jean-Daniel's version and mine (which is his plus the fix). *** c-mode.el.ORIG Sun Jul 21 00:19:52 1985 --- c-mode.el Sun Jul 21 01:02:27 1985 *************** *** 165,171 (skip-chars-backward " \t") (bolp)) (progn ! (if c-auto-newline (newline)) c-auto-newline))) (progn (insert last-command-char) --- 165,173 ----- (skip-chars-backward " \t") (bolp)) (progn ! (if c-auto-newline (progn ! (c-indent-line) ! (newline))) c-auto-newline))) (progn (insert last-command-char) --Vijay--