From: Richard M. Stallman Date: Tue, 19 Jan 1999 03:23:10 +0000 (+0000) Subject: (pascal-calculate-indent): Code with an invalid X-Git-Tag: emacs-20.4~831 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8d3ad6afd20aac24c0d0d81b4d9d9359664bbac;p=emacs.git (pascal-calculate-indent): Code with an invalid beginning could cause Emacs to hang. Fixed. --- diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index f4bc8d41a84..3cbfc5c8fd2 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -897,13 +897,13 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." (and (not complete) (looking-at pascal-sub-block-re)) (throw 'nesting 'block)) + (;--No known statements + (bobp) + (throw 'nesting 'unknown)) (;--Found complete statement (save-excursion (forward-sexp 1) (= (following-char) ?\;)) (setq complete t)) - (;--No known statements - (bobp) - (throw 'nesting 'unknown)) ))))) ;; Return type of block and indent level.