Function: f90-indent-line
f90-indent-line is an interactive and byte-compiled function defined
in f90.el.gz.
Signature
(f90-indent-line &optional NO-UPDATE)
Documentation
Indent current line as F90 code.
Unless optional argument NO-UPDATE is non-nil, call f90-update-line
after indenting.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/f90.el.gz
(defun f90-indent-line (&optional no-update)
"Indent current line as F90 code.
Unless optional argument NO-UPDATE is non-nil, call `f90-update-line'
after indenting."
(interactive "*P")
(let ((case-fold-search t)
(pos (point-marker))
indent no-line-number)
(beginning-of-line) ; digits after & \n are not line-nos
(if (not (save-excursion (and (f90-previous-statement)
(f90-line-continued))))
(f90-indent-line-no)
(setq no-line-number t)
(skip-chars-forward " \t"))
;; FIXME This means f90-calculate-indent gives different answers
;; for comments and preprocessor lines to this function.
;; Better to make f90-calculate-indent return the correct answer?
(cond ((= (following-char) ?!) (setq indent (f90-comment-indent)))
((= (following-char) ?#) (setq indent 0))
(t
(and f90-smart-end (looking-at "end")
(f90-match-end))
(setq indent (f90-calculate-indent))))
(or (= indent (current-column))
(f90-indent-to indent no-line-number))
;; If initial point was within line's indentation,
;; position after the indentation. Else stay at same point in text.
(and (< (point) pos)
(goto-char pos))
(if auto-fill-function
;; GM NO-UPDATE not honored, since this calls f90-update-line.
(f90-do-auto-fill)
(or no-update (f90-update-line)))
(set-marker pos nil)))