changeset 16466:2c5c58435c00

(pascal-indent-declaration): Avoid infinite loop if edpos is at end of buffer.
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Oct 1996 16:05:58 +0000
parents 398e3995162d
children 446f51ea7cb8
files lisp/progmodes/pascal.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/pascal.el	Sat Oct 26 16:01:22 1996 +0000
+++ b/lisp/progmodes/pascal.el	Sat Oct 26 16:05:58 1996 +0000
@@ -989,7 +989,8 @@
 	;; Do lineup
 	(setq ind (pascal-get-lineup-indent stpos edpos lineup))
 	(goto-char stpos)
-	(while (<= (point) (marker-position edpos))
+	(while (and (<= (point) (marker-position edpos))
+		    (not (eobp)))
 	  (if (search-forward lineup (pascal-get-end-of-line) 'move)
 	      (forward-char -1))
 	  (delete-horizontal-space)