summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-08-10 20:09:13 +0000
committerGlenn Morris <rgm@gnu.org>2008-08-10 20:09:13 +0000
commit8f010b8fbbc5e868329581750396967dca51b3c0 (patch)
tree83d95a42402f54d7e5e493c12ccf439bae2a1066
parent9e7efbfa811d9464d82c1555ce6d0589008c1acd (diff)
downloademacs-8f010b8fbbc5e868329581750396967dca51b3c0.tar.gz
(fortran-end-of-subprogram): Check for a match before trying to move
there (sync from trunk 2008-06-11).
-rw-r--r--lisp/progmodes/fortran.el12
1 files 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.