From e6033883a5ddfe1566cf3bc400ec258a4c2c9fce Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 11 Nov 1993 05:25:09 +0000 Subject: [PATCH] Comment change. --- lisp/progmodes/c-mode.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index 1bc95a77243..bbb195a2b91 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el @@ -1137,6 +1137,13 @@ If within a string or comment, move by sentences instead of statements." (if (= (following-char) ?}) (setq this-indent (- this-indent c-indent-level))) (if (= (following-char) ?{) + ;; Don't move an open-brace in column 0. + ;; This is good when constructs such as + ;; `extern "C" {' surround a function definition + ;; that should be indented as usual. + ;; It is also good for nested functions. + ;; It is bad when an open-brace is indented at column 0 + ;; and you want to fix that, but we can't win 'em all. (if (zerop (current-column)) (setq this-indent 0) (setq this-indent (+ this-indent c-brace-offset)))) -- 2.39.5