From c8d3ad6afd20aac24c0d0d81b4d9d9359664bbac Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 19 Jan 1999 03:23:10 +0000 Subject: [PATCH] (pascal-calculate-indent): Code with an invalid beginning could cause Emacs to hang. Fixed. --- lisp/progmodes/pascal.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. -- 2.39.2