# HG changeset patch # User Glenn Morris # Date 1218398953 0 # Node ID 3c8c80b9ca33abb434732cb17f5ea09d18c84b8a # Parent 2eaab780bfe394a8bf78774343660ad1606a2a61 (fortran-end-of-subprogram): Check for a match before trying to move there (sync from trunk 2008-06-11). diff -r 2eaab780bfe3 -r 3c8c80b9ca33 lisp/progmodes/fortran.el --- a/lisp/progmodes/fortran.el Sun Aug 10 20:08:50 2008 +0000 +++ b/lisp/progmodes/fortran.el Sun Aug 10 20:09:13 2008 +0000 @@ -1122,12 +1122,12 @@ (fortran-check-end-prog-re))) (forward-line) (beginning-of-line 2) - (catch 'ok - (while (re-search-forward fortran-end-prog-re nil 'move) - (if (fortran-check-end-prog-re) - (throw 'ok t)))) - (goto-char (match-beginning 0)) - (forward-line))))) + (when (catch 'ok + (while (re-search-forward fortran-end-prog-re nil 'move) + (if (fortran-check-end-prog-re) + (throw 'ok t)))) + (goto-char (match-beginning 0)) + (forward-line)))))) (defun fortran-previous-statement () "Move point to beginning of the previous Fortran statement.