diff options
| -rw-r--r-- | lisp/progmodes/c-mode.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index bbb195a2b91..ddda62454f5 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el | |||
| @@ -1211,11 +1211,13 @@ If within a string or comment, move by sentences instead of statements." | |||
| 1211 | (error (setq sexpend nil) | 1211 | (error (setq sexpend nil) |
| 1212 | (goto-char nextline))) | 1212 | (goto-char nextline))) |
| 1213 | (skip-chars-forward " \t\n")) | 1213 | (skip-chars-forward " \t\n")) |
| 1214 | ;; Make sure the sexp we found really starts on the | 1214 | (if sexpend |
| 1215 | ;; current line and extends past it. | 1215 | (progn |
| 1216 | (goto-char sexpend) | 1216 | ;; Make sure the sexp we found really starts on the |
| 1217 | (backward-sexp 1) | 1217 | ;; current line and extends past it. |
| 1218 | (setq sexpbeg (point))) | 1218 | (goto-char sexpend) |
| 1219 | (backward-sexp 1) | ||
| 1220 | (setq sexpbeg (point))))) | ||
| 1219 | ;; If that sexp ends within the region, | 1221 | ;; If that sexp ends within the region, |
| 1220 | ;; indent it all at once, fast. | 1222 | ;; indent it all at once, fast. |
| 1221 | (if (and sexpend (> sexpend nextline) (<= sexpend endmark) | 1223 | (if (and sexpend (> sexpend nextline) (<= sexpend endmark) |