Function: f90-looking-at-if-then

f90-looking-at-if-then is a byte-compiled function defined in f90.el.gz.

Signature

(f90-looking-at-if-then)

Documentation

Return ("if" NAME) if an if () then statement starts after point.

NAME is nil if the statement has no label.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/f90.el.gz
(defsubst f90-looking-at-if-then ()
  "Return (\"if\" NAME) if an if () then statement starts after point.
NAME is nil if the statement has no label."
  (save-excursion
    (when (looking-at "\\(\\(\\(?:\\sw\\|\\s_\\)+\\)[ \t]*:\\)?[ \t]*\\(if\\)\\_>")
      (let ((struct (match-string 3))
            (label (match-string 2))
            (pos (scan-lists (point) 1 0)))
        (and pos (goto-char pos))
        (skip-chars-forward " \t")
        (if (or (looking-at "then\\_>")
                (when (f90-line-continued)
                  (f90-next-statement)
                  (skip-chars-forward " \t0-9&")
                  (looking-at "then\\_>")))
            (list struct label))))))