Commit 7c9097d0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(pascal-indent-declaration): Avoid infinite loop

if edpos is at end of buffer.
parent 91f64ec2
...@@ -989,7 +989,8 @@ indent of the current line in parameterlist." ...@@ -989,7 +989,8 @@ indent of the current line in parameterlist."
;; Do lineup ;; Do lineup
(setq ind (pascal-get-lineup-indent stpos edpos lineup)) (setq ind (pascal-get-lineup-indent stpos edpos lineup))
(goto-char stpos) (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) (if (search-forward lineup (pascal-get-end-of-line) 'move)
(forward-char -1)) (forward-char -1))
(delete-horizontal-space) (delete-horizontal-space)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment