Mercurial > emacs
comparison lisp/progmodes/f90.el @ 45370:4055a77b0abb
(f90-match-end): Simplify it a bit.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 19 May 2002 21:46:23 +0000 |
parents | d1b710ae9184 |
children | ecefa899fdb3 |
comparison
equal
deleted
inserted
replaced
45369:4d4036be4f4d | 45370:4055a77b0abb |
---|---|
1596 (setq end-struct (f90-looking-at-program-block-end))) | 1596 (setq end-struct (f90-looking-at-program-block-end))) |
1597 (setq end-block (car end-struct) | 1597 (setq end-block (car end-struct) |
1598 end-name (car (cdr end-struct))) | 1598 end-name (car (cdr end-struct))) |
1599 (save-excursion | 1599 (save-excursion |
1600 (beginning-of-line) | 1600 (beginning-of-line) |
1601 (while | 1601 (while (and (> count 0) (re-search-backward f90-blocks-re nil t)) |
1602 (and (not (zerop count)) | |
1603 (let ((stop nil) notexist) | |
1604 (while (not stop) | |
1605 (setq notexist | |
1606 (not (re-search-backward | |
1607 (concat "\\(" f90-blocks-re "\\)") nil t))) | |
1608 (if notexist | |
1609 (setq stop t) | |
1610 (setq stop | |
1611 (not (or (f90-in-string) | |
1612 (f90-in-comment)))))) | |
1613 (not notexist))) | |
1614 (beginning-of-line) | 1602 (beginning-of-line) |
1615 (skip-chars-forward " \t0-9") | 1603 (skip-chars-forward " \t0-9") |
1616 (cond ((setq matching-beg | 1604 (cond ((or (f90-in-string) (f90-in-comment))) |
1605 ((setq matching-beg | |
1617 (or | 1606 (or |
1618 (f90-looking-at-do) | 1607 (f90-looking-at-do) |
1619 (f90-looking-at-if-then) | 1608 (f90-looking-at-if-then) |
1620 (f90-looking-at-where-or-forall) | 1609 (f90-looking-at-where-or-forall) |
1621 (f90-looking-at-select-case) | 1610 (f90-looking-at-select-case) |
1622 (f90-looking-at-type-like) | 1611 (f90-looking-at-type-like) |
1623 (f90-looking-at-program-block-start))) | 1612 (f90-looking-at-program-block-start))) |
1624 (setq count (1- count))) | 1613 (setq count (1- count))) |
1625 ((looking-at (concat "end[ \t]*" f90-blocks-re "\\b")) | 1614 ((looking-at (concat "end[ \t]*" f90-blocks-re)) |
1626 (setq count (1+ count))))) | 1615 (setq count (1+ count))))) |
1627 (if (not (zerop count)) | 1616 (if (> count 0) |
1628 (message "No matching beginning.") | 1617 (message "No matching beginning.") |
1629 (f90-update-line) | 1618 (f90-update-line) |
1630 (if (eq f90-smart-end 'blink) | 1619 (if (eq f90-smart-end 'blink) |
1631 (if (< (point) top-of-window) | 1620 (if (< (point) top-of-window) |
1632 (message "Matches %s: %s" | 1621 (message "Matches %s: %s" |