aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2002-05-19 21:47:46 +0000
committerGlenn Morris <[email protected]>2002-05-19 21:47:46 +0000
commit6dd52cafbdb9da8b498b20d039437185a8e6b7b6 (patch)
tree2916d23f2217daccd595947b747ec2feb96e6593
parent8bad880b02f435deccf7098cdc0099864dea28ae (diff)
(f90-match-end): Simplify it a bit.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/f90.el21
2 files changed, 9 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6fa2a5dd67..b74d7930ca 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2002-05-19 Glenn Morris <[email protected]>
+
+ * progmodes/f90.el (f90-match-end): Simplify it a bit.
+
2002-05-19 Richard M. Stallman <[email protected]>
* indent.el (indent-region): Make COLUMN arg optional.
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 2c56284ae6..f06883c764 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1598,22 +1598,11 @@ Leave point at the end of line."
end-name (car (cdr end-struct)))
(save-excursion
(beginning-of-line)
- (while
- (and (not (zerop count))
- (let ((stop nil) notexist)
- (while (not stop)
- (setq notexist
- (not (re-search-backward
- (concat "\\(" f90-blocks-re "\\)") nil t)))
- (if notexist
- (setq stop t)
- (setq stop
- (not (or (f90-in-string)
- (f90-in-comment))))))
- (not notexist)))
+ (while (and (> count 0) (re-search-backward f90-blocks-re nil t))
(beginning-of-line)
(skip-chars-forward " \t0-9")
- (cond ((setq matching-beg
+ (cond ((or (f90-in-string) (f90-in-comment)))
+ ((setq matching-beg
(or
(f90-looking-at-do)
(f90-looking-at-if-then)
@@ -1622,9 +1611,9 @@ Leave point at the end of line."
(f90-looking-at-type-like)
(f90-looking-at-program-block-start)))
(setq count (1- count)))
- ((looking-at (concat "end[ \t]*" f90-blocks-re "\\b"))
+ ((looking-at (concat "end[ \t]*" f90-blocks-re))
(setq count (1+ count)))))
- (if (not (zerop count))
+ (if (> count 0)
(message "No matching beginning.")
(f90-update-line)
(if (eq f90-smart-end 'blink)