From: Richard M. Stallman Date: Sun, 1 Aug 1993 05:17:42 +0000 (+0000) Subject: (indent-c-exp): Don't move an { from column 0. X-Git-Tag: emacs-19.34~11463 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b70af8d72fc78d50a39e128f5563b432f04d257a;p=emacs.git (indent-c-exp): Don't move an { from column 0. --- 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.