From: Richard M. Stallman Date: Tue, 23 Nov 1993 11:20:27 +0000 (+0000) Subject: (c-indent-region): As first thing, advance to a nonblank line. X-Git-Tag: emacs-19.34~10714 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=988e2aa66b5fac1864a0d58c95a3ffcc02ca6d37;p=emacs.git (c-indent-region): As first thing, advance to a nonblank line. --- 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)))