comparison lisp/progmodes/fortran.el @ 50600:418cea060d92

(fortran-tab-mode-minor-mode-string): Delete this variable, 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.
author Glenn Morris <rgm@gnu.org>
date Tue, 15 Apr 2003 20:43:43 +0000
parents 5f26cbba48ba
children 5ac877b692fe
comparison
equal deleted inserted replaced
50599:2538410bdfea 50600:418cea060d92
81 A value of nil specifies that continuation lines are marked 81 A value of nil specifies that continuation lines are marked
82 with a character in column 6." 82 with a character in column 6."
83 :type 'boolean 83 :type 'boolean
84 :group 'fortran-indent) 84 :group 'fortran-indent)
85 85
86 (defcustom fortran-tab-mode-string " TAB" 86 (defcustom fortran-tab-mode-string "/t"
87 "*String to appear in mode line in TAB format buffers. 87 "*String to appear in mode line in TAB format buffers."
88 Should have a leading space."
89 :type 'string 88 :type 'string
90 :group 'fortran-indent) 89 :group 'fortran-indent)
91
92 (defvar fortran-tab-mode-minor-mode-string nil
93 "Internal variable used for `minor-mode-alist' in Fortran mode.
94 Do not change the value of this variable - edit `fortran-tab-mode-string'
95 instead.")
96 (make-variable-buffer-local 'fortran-tab-mode-minor-mode-string)
97
98 (add-to-list 'minor-mode-alist
99 '(fortran-tab-mode-minor-mode-string
100 (indent-tabs-mode fortran-tab-mode-minor-mode-string)))
101 90
102 (defcustom fortran-do-indent 3 91 (defcustom fortran-do-indent 3
103 "*Extra indentation applied to DO blocks." 92 "*Extra indentation applied to DO blocks."
104 :type 'integer 93 :type 'integer
105 :group 'fortran-indent) 94 :group 'fortran-indent)
675 ;; (concat "\\(\\)\\(![ \t]*\\|" fortran-comment-line-start-skip "\\)") 664 ;; (concat "\\(\\)\\(![ \t]*\\|" fortran-comment-line-start-skip "\\)")
676 "\\(\\)\\(?:^[CcDd*]\\|!\\)\\(?:\\([^ \t\n]\\)\\2+\\)?[ \t]*") 665 "\\(\\)\\(?:^[CcDd*]\\|!\\)\\(?:\\([^ \t\n]\\)\\2+\\)?[ \t]*")
677 (set (make-local-variable 'comment-indent-function) 'fortran-comment-indent) 666 (set (make-local-variable 'comment-indent-function) 'fortran-comment-indent)
678 (set (make-local-variable 'abbrev-all-caps) t) 667 (set (make-local-variable 'abbrev-all-caps) t)
679 (set (make-local-variable 'normal-auto-fill-function) 'fortran-auto-fill) 668 (set (make-local-variable 'normal-auto-fill-function) 'fortran-auto-fill)
680 (setq fortran-tab-mode-minor-mode-string fortran-tab-mode-string)
681 (set (make-local-variable 'indent-tabs-mode) (fortran-analyze-file-format)) 669 (set (make-local-variable 'indent-tabs-mode) (fortran-analyze-file-format))
670 (setq mode-line-process '(indent-tabs-mode fortran-tab-mode-string))
682 (set (make-local-variable 'fill-column) 72) 671 (set (make-local-variable 'fill-column) 72)
683 (set (make-local-variable 'fill-paragraph-function) 'fortran-fill-paragraph) 672 (set (make-local-variable 'fill-paragraph-function) 'fortran-fill-paragraph)
684 (set (make-local-variable 'font-lock-defaults) 673 (set (make-local-variable 'font-lock-defaults)
685 '((fortran-font-lock-keywords 674 '((fortran-font-lock-keywords
686 fortran-font-lock-keywords-1 675 fortran-font-lock-keywords-1
1759 (forward-line) 1748 (forward-line)
1760 (setq i (1+ i))) 1749 (setq i (1+ i)))
1761 (cond 1750 (cond
1762 ((eq (char-after) ?\t) t) 1751 ((eq (char-after) ?\t) t)
1763 ((looking-at " \\{6\\}") nil) 1752 ((looking-at " \\{6\\}") nil)
1764 (fortran-tab-mode-default t) 1753 (t fortran-tab-mode-default)))))
1765 (t nil)))))
1766 1754
1767 (defun fortran-fill-paragraph (&optional justify) 1755 (defun fortran-fill-paragraph (&optional justify)
1768 "Fill surrounding comment block as paragraphs, else fill statement. 1756 "Fill surrounding comment block as paragraphs, else fill statement.
1769 Intended as the value of `fill-paragraph-function'. 1757 Intended as the value of `fill-paragraph-function'.
1770 A comment block is filled by calling `fill-comment-paragraph' with 1758 A comment block is filled by calling `fill-comment-paragraph' with