summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-23 11:20:27 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-23 11:20:27 +0000
commit32a7b440eb1c70ccbceb44aace85bd84691d5f60 (patch)
tree1b374bc814431378e1dff2e65244efd7bb2eb879 /lisp/progmodes
parentbb8279ac414305f65b3340467bfa36196349aa7b (diff)
downloademacs-32a7b440eb1c70ccbceb44aace85bd84691d5f60.tar.gz
(c-indent-region): As first thing, advance to a nonblank line.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/c-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el
index ddda62454f5..429d0bf2292 100644
--- a/lisp/progmodes/c-mode.el
+++ b/lisp/progmodes/c-mode.el
@@ -1191,6 +1191,9 @@ If within a string or comment, move by sentences instead of statements."
(defun c-indent-region (start end)
(save-excursion
(goto-char start)
+ ;; Advance to first nonblank line.
+ (skip-chars-forward " \t\n")
+ (beginning-of-line)
(let ((endmark (copy-marker end))
(c-tab-always-indent t))
(while (and (bolp) (not (eolp)))