Function: f90-end-of-subprogram

f90-end-of-subprogram is an interactive and byte-compiled function defined in f90.el.gz.

Signature

(f90-end-of-subprogram)

Documentation

Move point to the end of the current subprogram.

Return (TYPE NAME), or nil if not found.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/f90.el.gz
(defun f90-end-of-subprogram ()
  "Move point to the end of the current subprogram.
Return (TYPE NAME), or nil if not found."
  (interactive)
  (let ((case-fold-search t)
        (count 1)
        matching-end)
    (end-of-line)
    (while (and (> count 0)
                (re-search-forward f90-program-block-re nil 'move))
      (beginning-of-line)
      (skip-chars-forward " \t0-9")
      (cond ((f90-in-string))
            ((f90-looking-at-program-block-start)
             (setq count (1+ count)))
            ((setq matching-end (f90-looking-at-program-block-end))
             (setq count (1- count))))
      (end-of-line))
    ;; This means f90-end-of-subprogram followed by f90-start-of-subprogram
    ;; has a net non-zero effect, which seems odd.
;;;    (forward-line 1)
    (if (zerop count)
        matching-end
      (if (called-interactively-p 'interactive)
	  (message "No end found"))
      nil)))