(fortran-break-delimiters-re, fortran-no-break-re): New defconsts.
(fortran-fill): When filling a string, adjust re-search-backward
argument for special case of string just on fill-column.
When filling non-string, allow one extra char if
fortran-break-before-delimiters is non-nil. Suggested by
Michael Hagemann <michael.hagemann@unibas.ch>.
Use fortran-break-delimiters-re and fortran-no-break-re to
correctly handle cases such as "**".
introduced in previous change.
(fortran-tab-mode-string): Change default value.
(fortran-mode): Use mode-line-process (rather than
minor-mode-alist) to indicate tab format code.
(fortran-analyze-file-format): Return fortran-tab-mode-default if
no match.
(fortran-calculate-indent): Do not add extra whitespace to strings
broken over lines. Remove superfluous progn.
(fortran-fill): Handle long strings that must be broken over lines.
(fortran-previous-statement, fortran-next-statement): Make them skip over
preprocessor lines as they do with comment lines.
(fortran-calculate-indent): Use fortran-preprocessor-re.
Add fortran-comment-line-start-skip to comment-start-skip.
(fortran-comment-indent): Keep whole-line comments in column 0.
(fortran-find-comment-start-skip): New arg `all'.
If ALL is nil, make sure we only match comment-start-skip if we
can't match fortran-comment-line-start-skip.
Fix bug that made it return t but without moving point when
matching '!'! (a false-comment followed by a real comment).
(fortran-indent-comment): Use new `all' argument above.
Be careful not to add an incorrect comment-starter like "C"
in comment-column.
(fortran-split-line): When splitting a comment, reuse the comment
starter from the current line rather than fortran-comment-line-start.
(fortran-indent-line, fortran-auto-fill): Simplify thanks to the
cleaner behavior of fortran-find-comment-start-skip.
(fortran-fill): Don't be confused by ! inside a comment.
(fortran-break-line): Minor cleanup and simplification.
(fortran-mode-syntax-table): Defvar directly.
(fortran-font-lock-keywords-1, fortran-font-lock-keywords-2)
(fortran-font-lock-keywords-3, fortran-font-lock-syntactic-keywords):
Use defvar, not defconst.
(fortran-mode-map): Change locals in `let'. Use `fortran-auto-fill'.
(fortran-mode): Set fortran-comment-line-start-skip,
fortran-comment-line-start-skip, dabbrev-case-fold-search.
(fortran-comment-indent): Use defsubst.
(fortran-indent-comment, fortran-indent-to-column, fortran-break-line):
Use fortran-comment-indent, not fortran-comment-indent-function.
(fortran-comment-region, fortran-electric-line-number): Simplify.
(fortran-auto-fill): New function.
(fortran-do-auto-fill): Deleted.
(fortran-find-comment-start-skip): Check for non-null
comment-start-skip.
(fortran-auto-fill-mode, fortran-fill-statement): Use
fortran-auto-fill.
(fortran-fill): Use fortran-auto-fill. Check for null
comment-start-skip. Simplify final clause and use end-of-line finally.
"C".
(fortran-comment-line-start-skip): Don't match cpp stuff.
(font-lock-keywords): Add * to comment-chars. Grok cpp stuff.
(fortran-mode-map): Remove over-eager custom-menu-create for now.
(fortran-mode): Don't set fortran-comment-line-start-skip,
fortran-comment-line-start here. Set comment-start,
add-log-current-defun.
(fortran-fill-paragraph): Adjust to try to DTRT with cpp stuff.
(fortran-current-defun): New function.
(fortran-comment-line-start-skip): Renamed from
comment-line-start-skip.
(fortran-mode-map): Use renamed functions. Add manual and custom
entries to menu.
(fortran-mode-hook): Customize.
(fortran-comment-indent-function): Renamed from fortran-comment-hook.
(delete-horizontal-regexp): Function deleted.
(fortran-electric-line-number): Simplified.
(fortran-beginning-of-subprogram): Renamed from
beginning-of-fortran-subprogram.
(fortran-end-of-subprogram): Renamed from end-of-fortran-subprogram.
(fortran-mark-subprogram): Renamed from mark-fortran-subprogram.
(fortran-previous-statement, fortran-next-statement): Simplified.
(fortran-blink-match): New function.
(fortran-blink-matching-if, fortran-blink-matching-do): Use it.
(fortran-indent-to-column): Don't use delete-horizontal-regexp.
(fortran-find-comment-start-skip, fortran-is-in-string-p): Use
line-end-position.
(fortran-fill): No longer interactive. Simplified.
(fortran-break-line): Simplified.
(fortran-analyze-file-format): Use char-after, not looking-at.
syntax.
(fortran-fontify-string, fortran-match-!-commen): Deleted.
(fortran-font-lock-syntactic-keywords): New variable.
(fortran-mode): Use it.
(fortran-font-lock-keywords-1): Don't do comments.
(beginning-of-fortran-subprogram, end-of-fortran-subprogram):
Save match data.
(fortran-blink-matching-if): Match ELSE statements too.
(fortran-fill-statement, fortran-fill): Bind auto-fill-function so
that filling is always done.