]> git.eshelyaron.com Git - emacs.git/commitdiff
(pascal-calculate-indent): Code with an invalid
authorRichard M. Stallman <rms@gnu.org>
Tue, 19 Jan 1999 03:23:10 +0000 (03:23 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 19 Jan 1999 03:23:10 +0000 (03:23 +0000)
beginning could cause Emacs to hang.  Fixed.

lisp/progmodes/pascal.el

index f4bc8d41a844426ee78cd0ed75edc19b83609e18..3cbfc5c8fd277baa6a597ff6216ee6be7f23adb6 100644 (file)
@@ -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.