changeset 5124:1aba6a79cb3d

(c-indent-region): Don't goto-char sexpend if it's nil.
author Richard M. Stallman <rms@gnu.org>
date Tue, 23 Nov 1993 08:35:46 +0000
parents 4bf8c101aaef
children 127a513c13b2
files lisp/progmodes/c-mode.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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)