From b70af8d72fc78d50a39e128f5563b432f04d257a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 1 Aug 1993 05:17:42 +0000 Subject: [PATCH] (indent-c-exp): Don't move an { from column 0. --- lisp/progmodes/c-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index cdbf2246313..bd4186aa90a 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el @@ -1137,7 +1137,9 @@ ENDPOS is encountered." (if (= (following-char) ?}) (setq this-indent (- this-indent c-indent-level))) (if (= (following-char) ?{) - (setq this-indent (+ this-indent c-brace-offset))) + (if (zerop (current-column)) + (setq this-indent 0) + (setq this-indent (+ this-indent c-brace-offset)))) ;; Don't leave indentation in empty lines. (if (eolp) (setq this-indent 0)) ;; Put chosen indentation into effect. -- 2.39.5