Function: fortran-analyze-file-format

fortran-analyze-file-format is a byte-compiled function defined in fortran.el.gz.

Signature

(fortran-analyze-file-format)

Documentation

Return nil if fixed format is used, t if TAB formatting is used.

Use fortran-tab-mode-default if no non-comment statements are found before the end or in the first fortran-analyze-depth lines.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/fortran.el.gz
(defun fortran-analyze-file-format ()
  "Return nil if fixed format is used, t if TAB formatting is used.
Use `fortran-tab-mode-default' if no non-comment statements are found
before the end or in the first `fortran-analyze-depth' lines."
  (let ((i 0))
    (save-excursion
      (goto-char (point-min))
      (while (not (or
                   (eobp)
                   (eq (char-after) ?\t)
                   (looking-at " \\{6\\}")
                   (> i fortran-analyze-depth)))
        (forward-line)
        (setq i (1+ i)))
      (cond
       ((eq (char-after) ?\t) t)
       ((looking-at " \\{6\\}") nil)
       (t fortran-tab-mode-default)))))