# HG changeset patch # User Richard M. Stallman # Date 754043746 0 # Node ID 1aba6a79cb3d725d6c93c4a4976e21d7c17e6719 # Parent 4bf8c101aaef97c7824761c5649f6b3e88713164 (c-indent-region): Don't goto-char sexpend if it's nil. diff -r 4bf8c101aaef -r 1aba6a79cb3d lisp/progmodes/c-mode.el --- a/lisp/progmodes/c-mode.el Tue Nov 23 08:31:03 1993 +0000 +++ b/lisp/progmodes/c-mode.el Tue Nov 23 08:35:46 1993 +0000 @@ -1211,11 +1211,13 @@ (error (setq sexpend nil) (goto-char nextline))) (skip-chars-forward " \t\n")) - ;; Make sure the sexp we found really starts on the - ;; current line and extends past it. - (goto-char sexpend) - (backward-sexp 1) - (setq sexpbeg (point))) + (if sexpend + (progn + ;; Make sure the sexp we found really starts on the + ;; current line and extends past it. + (goto-char sexpend) + (backward-sexp 1) + (setq sexpbeg (point))))) ;; If that sexp ends within the region, ;; indent it all at once, fast. (if (and sexpend (> sexpend nextline) (<= sexpend endmark)