changeset 1054:f6f13367d93c

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Aug 1992 08:27:31 +0000
parents a411429c4140
children 7eb43ab890e0
files lisp/progmodes/c-mode.el
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/c-mode.el	Sat Aug 29 03:33:12 1992 +0000
+++ b/lisp/progmodes/c-mode.el	Sat Aug 29 08:27:31 1992 +0000
@@ -629,9 +629,15 @@
 		     ;; The first following code counts
 		     ;; if it is before the line we want to indent.
 		     (and (< (point) indent-point)
-			  (if (> colon-line-end (point))
-			      (- (current-indentation) c-label-offset)
-			    (current-column)))))
+			  (- 
+			   (if (> colon-line-end (point))
+			       (- (current-indentation) c-label-offset)
+			     (current-column))
+			   ;; If prev stmt starts with open-brace, that
+			   ;; open brace was offset by c-brace-offset.
+			   ;; Compensate to get the column where
+			   ;; an ordinary statement would start.
+			   (if (= (following-char) ?\{) c-brace-offset 0)))))
 		 ;; If no previous statement,
 		 ;; indent it relative to line brace is on.
 		 ;; For open brace in column zero, don't let statement