From 8f010b8fbbc5e868329581750396967dca51b3c0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:09:13 +0000 Subject: [PATCH] (fortran-end-of-subprogram): Check for a match before trying to move there (sync from trunk 2008-06-11). --- lisp/progmodes/fortran.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 0e7fd0ee051..c22f128a13b 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1122,12 +1122,12 @@ Auto-indent does not happen if a numeric ARG is used." (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. -- 2.39.5