# HG changeset patch # User Richard M. Stallman # Date 846345958 0 # Node ID 2c5c58435c0037354ebc43381cb5abbec5fb54f3 # Parent 398e3995162dc5cc217c93aae51aa158f69aca48 (pascal-indent-declaration): Avoid infinite loop if edpos is at end of buffer. diff -r 398e3995162d -r 2c5c58435c00 lisp/progmodes/pascal.el --- 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)