Mercurial > emacs
comparison lisp/progmodes/fortran.el @ 80711:3c8c80b9ca33
(fortran-end-of-subprogram): Check for a match before trying to move
there (sync from trunk 2008-06-11).
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 10 Aug 2008 20:09:13 +0000 |
parents | 3299f73f467e |
children |
comparison
equal
deleted
inserted
replaced
80710:2eaab780bfe3 | 80711:3c8c80b9ca33 |
---|---|
1120 (beginning-of-line) | 1120 (beginning-of-line) |
1121 (and (looking-at fortran-end-prog-re) | 1121 (and (looking-at fortran-end-prog-re) |
1122 (fortran-check-end-prog-re))) | 1122 (fortran-check-end-prog-re))) |
1123 (forward-line) | 1123 (forward-line) |
1124 (beginning-of-line 2) | 1124 (beginning-of-line 2) |
1125 (catch 'ok | 1125 (when (catch 'ok |
1126 (while (re-search-forward fortran-end-prog-re nil 'move) | 1126 (while (re-search-forward fortran-end-prog-re nil 'move) |
1127 (if (fortran-check-end-prog-re) | 1127 (if (fortran-check-end-prog-re) |
1128 (throw 'ok t)))) | 1128 (throw 'ok t)))) |
1129 (goto-char (match-beginning 0)) | 1129 (goto-char (match-beginning 0)) |
1130 (forward-line))))) | 1130 (forward-line)))))) |
1131 | 1131 |
1132 (defun fortran-previous-statement () | 1132 (defun fortran-previous-statement () |
1133 "Move point to beginning of the previous Fortran statement. | 1133 "Move point to beginning of the previous Fortran statement. |
1134 Returns 'first-statement if that statement is the first | 1134 Returns 'first-statement if that statement is the first |
1135 non-comment Fortran statement in the file, and nil otherwise. | 1135 non-comment Fortran statement in the file, and nil otherwise. |