diff options
| author | Glenn Morris | 2007-10-23 06:52:04 +0000 |
|---|---|---|
| committer | Glenn Morris | 2007-10-23 06:52:04 +0000 |
| commit | 6ac8618ab293e31e35c7a2f9efc1314e9ee8aab1 (patch) | |
| tree | 014dfcdfcce70970197f03ded9fad2adf50f2e22 | |
| parent | b3c66f78642043701633f76e1959ca26f16dcc5a (diff) | |
| download | emacs-6ac8618ab293e31e35c7a2f9efc1314e9ee8aab1.tar.gz emacs-6ac8618ab293e31e35c7a2f9efc1314e9ee8aab1.zip | |
(fortran-tab-mode-default)
(fortran-tab-mode-string, fortran-do-indent, fortran-if-indent)
(fortran-structure-indent, fortran-continuation-indent)
(fortran-comment-indent, fortran-comment-line-extra-indent)
(fortran-comment-line-start)
(fortran-minimum-statement-indent-fixed)
(fortran-minimum-statement-indent-tab)
(fortran-comment-indent-char, fortran-line-number-indent)
(fortran-check-all-num-for-matching-do)
(fortran-blink-matching-if, fortran-continuation-string)
(fortran-comment-region, fortran-electric-line-number)
(fortran-column-ruler-fixed, fortran-column-ruler-tab)
(fortran-analyze-depth, fortran-break-before-delimiters):
Give an appropriate safe-local-variable property.
| -rw-r--r-- | lisp/progmodes/fortran.el | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index c400ea3099d..9e38f9aa32e 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -86,31 +86,37 @@ A value of nil specifies that continuation lines are marked | |||
| 86 | with a character in column 6." | 86 | with a character in column 6." |
| 87 | :type 'boolean | 87 | :type 'boolean |
| 88 | :group 'fortran-indent) | 88 | :group 'fortran-indent) |
| 89 | (put 'fortran-tab-mode-default 'safe-local-variable 'booleanp) | ||
| 89 | 90 | ||
| 90 | (defcustom fortran-tab-mode-string "/t" | 91 | (defcustom fortran-tab-mode-string "/t" |
| 91 | "*String to appear in mode line in TAB format buffers." | 92 | "*String to appear in mode line in TAB format buffers." |
| 92 | :type 'string | 93 | :type 'string |
| 93 | :group 'fortran-indent) | 94 | :group 'fortran-indent) |
| 95 | (put 'fortran-tab-mode-string 'safe-local-variable 'stringp) | ||
| 94 | 96 | ||
| 95 | (defcustom fortran-do-indent 3 | 97 | (defcustom fortran-do-indent 3 |
| 96 | "*Extra indentation applied to DO blocks." | 98 | "*Extra indentation applied to DO blocks." |
| 97 | :type 'integer | 99 | :type 'integer |
| 98 | :group 'fortran-indent) | 100 | :group 'fortran-indent) |
| 101 | (put 'fortran-do-indent 'safe-local-variable 'integerp) | ||
| 99 | 102 | ||
| 100 | (defcustom fortran-if-indent 3 | 103 | (defcustom fortran-if-indent 3 |
| 101 | "*Extra indentation applied to IF, SELECT CASE and WHERE blocks." | 104 | "*Extra indentation applied to IF, SELECT CASE and WHERE blocks." |
| 102 | :type 'integer | 105 | :type 'integer |
| 103 | :group 'fortran-indent) | 106 | :group 'fortran-indent) |
| 107 | (put 'fortran-if-indent 'safe-local-variable 'integerp) | ||
| 104 | 108 | ||
| 105 | (defcustom fortran-structure-indent 3 | 109 | (defcustom fortran-structure-indent 3 |
| 106 | "*Extra indentation applied to STRUCTURE, UNION, MAP and INTERFACE blocks." | 110 | "*Extra indentation applied to STRUCTURE, UNION, MAP and INTERFACE blocks." |
| 107 | :type 'integer | 111 | :type 'integer |
| 108 | :group 'fortran-indent) | 112 | :group 'fortran-indent) |
| 113 | (put 'fortran-structure-indent 'safe-local-variable 'integerp) | ||
| 109 | 114 | ||
| 110 | (defcustom fortran-continuation-indent 5 | 115 | (defcustom fortran-continuation-indent 5 |
| 111 | "*Extra indentation applied to continuation lines." | 116 | "*Extra indentation applied to continuation lines." |
| 112 | :type 'integer | 117 | :type 'integer |
| 113 | :group 'fortran-indent) | 118 | :group 'fortran-indent) |
| 119 | (put 'fortran-continuation-indent 'safe-local-variable 'integerp) | ||
| 114 | 120 | ||
| 115 | (defcustom fortran-comment-indent-style 'fixed | 121 | (defcustom fortran-comment-indent-style 'fixed |
| 116 | "*How to indent comments. | 122 | "*How to indent comments. |
| @@ -122,12 +128,15 @@ nil forces comment lines not to be touched; | |||
| 122 | `fortran-comment-line-extra-indent'." | 128 | `fortran-comment-line-extra-indent'." |
| 123 | :type '(radio (const :tag "Untouched" nil) (const fixed) (const relative)) | 129 | :type '(radio (const :tag "Untouched" nil) (const fixed) (const relative)) |
| 124 | :group 'fortran-indent) | 130 | :group 'fortran-indent) |
| 131 | (put 'fortran-comment-indent 'safe-local-variable | ||
| 132 | (lambda (value) (memq value '(nil fixed relative)))) | ||
| 125 | 133 | ||
| 126 | (defcustom fortran-comment-line-extra-indent 0 | 134 | (defcustom fortran-comment-line-extra-indent 0 |
| 127 | "*Amount of extra indentation for text within full-line comments." | 135 | "*Amount of extra indentation for text within full-line comments." |
| 128 | :type 'integer | 136 | :type 'integer |
| 129 | :group 'fortran-indent | 137 | :group 'fortran-indent |
| 130 | :group 'fortran-comment) | 138 | :group 'fortran-comment) |
| 139 | (put 'fortran-comment-line-extra-indent 'safe-local-variable 'integerp) | ||
| 131 | 140 | ||
| 132 | (defcustom fortran-comment-line-start "C" | 141 | (defcustom fortran-comment-line-start "C" |
| 133 | "*Delimiter inserted to start new full-line comment. | 142 | "*Delimiter inserted to start new full-line comment. |
| @@ -135,6 +144,7 @@ You might want to change this to \"*\", for instance." | |||
| 135 | :version "21.1" | 144 | :version "21.1" |
| 136 | :type 'string | 145 | :type 'string |
| 137 | :group 'fortran-comment) | 146 | :group 'fortran-comment) |
| 147 | (put 'fortran-comment-line-start 'safe-local-variable 'stringp) | ||
| 138 | 148 | ||
| 139 | ;; This used to match preprocessor lines too, but that messes up | 149 | ;; This used to match preprocessor lines too, but that messes up |
| 140 | ;; filling and doesn't seem to be necessary. | 150 | ;; filling and doesn't seem to be necessary. |
| @@ -144,6 +154,7 @@ You might want to change this to \"*\", for instance." | |||
| 144 | :version "21.1" | 154 | :version "21.1" |
| 145 | :type 'regexp | 155 | :type 'regexp |
| 146 | :group 'fortran-comment) | 156 | :group 'fortran-comment) |
| 157 | ;; FIXME is an arbitrary regexp safe? | ||
| 147 | 158 | ||
| 148 | (defcustom fortran-directive-re | 159 | (defcustom fortran-directive-re |
| 149 | "^[ \t]*#.*" | 160 | "^[ \t]*#.*" |
| @@ -153,16 +164,19 @@ The matching line will be given zero indentation." | |||
| 153 | :version "22.1" | 164 | :version "22.1" |
| 154 | :type 'regexp | 165 | :type 'regexp |
| 155 | :group 'fortran-indent) | 166 | :group 'fortran-indent) |
| 167 | ;; FIXME is an arbitrary regexp safe? | ||
| 156 | 168 | ||
| 157 | (defcustom fortran-minimum-statement-indent-fixed 6 | 169 | (defcustom fortran-minimum-statement-indent-fixed 6 |
| 158 | "*Minimum statement indentation for fixed format continuation style." | 170 | "*Minimum statement indentation for fixed format continuation style." |
| 159 | :type 'integer | 171 | :type 'integer |
| 160 | :group 'fortran-indent) | 172 | :group 'fortran-indent) |
| 173 | (put 'fortran-minimum-statement-indent-fixed 'safe-local-variable 'integerp) | ||
| 161 | 174 | ||
| 162 | (defcustom fortran-minimum-statement-indent-tab (max tab-width 6) | 175 | (defcustom fortran-minimum-statement-indent-tab (max tab-width 6) |
| 163 | "*Minimum statement indentation for TAB format continuation style." | 176 | "*Minimum statement indentation for TAB format continuation style." |
| 164 | :type 'integer | 177 | :type 'integer |
| 165 | :group 'fortran-indent) | 178 | :group 'fortran-indent) |
| 179 | (put 'fortran-minimum-statement-indent-tab 'safe-local-variable 'integerp) | ||
| 166 | 180 | ||
| 167 | ;; Note that this is documented in the v18 manuals as being a string | 181 | ;; Note that this is documented in the v18 manuals as being a string |
| 168 | ;; of length one rather than a single character. | 182 | ;; of length one rather than a single character. |
| @@ -172,23 +186,30 @@ The matching line will be given zero indentation." | |||
| 172 | Normally a space." | 186 | Normally a space." |
| 173 | :type 'string | 187 | :type 'string |
| 174 | :group 'fortran-comment) | 188 | :group 'fortran-comment) |
| 189 | (put 'fortran-comment-indent-char 'safe-local-variable | ||
| 190 | (lambda (value) (or (char-valid-p value) | ||
| 191 | (and (stringp value) | ||
| 192 | (= (length value) 1))))) | ||
| 175 | 193 | ||
| 176 | (defcustom fortran-line-number-indent 1 | 194 | (defcustom fortran-line-number-indent 1 |
| 177 | "*Maximum indentation for Fortran line numbers. | 195 | "*Maximum indentation for Fortran line numbers. |
| 178 | 5 means right-justify them within their five-column field." | 196 | 5 means right-justify them within their five-column field." |
| 179 | :type 'integer | 197 | :type 'integer |
| 180 | :group 'fortran-indent) | 198 | :group 'fortran-indent) |
| 199 | (put 'fortran-line-number-indent 'safe-local-variable 'integerp) | ||
| 181 | 200 | ||
| 182 | (defcustom fortran-check-all-num-for-matching-do nil | 201 | (defcustom fortran-check-all-num-for-matching-do nil |
| 183 | "*Non-nil causes all numbered lines to be treated as possible DO loop ends." | 202 | "*Non-nil causes all numbered lines to be treated as possible DO loop ends." |
| 184 | :type 'boolean | 203 | :type 'boolean |
| 185 | :group 'fortran) | 204 | :group 'fortran) |
| 205 | (put 'fortran-check-all-num-for-matching-do 'safe-local-variable 'booleanp) | ||
| 186 | 206 | ||
| 187 | (defcustom fortran-blink-matching-if nil | 207 | (defcustom fortran-blink-matching-if nil |
| 188 | "*Non-nil causes \\[fortran-indent-line] on ENDIF to blink on matching IF. | 208 | "*Non-nil causes \\[fortran-indent-line] on ENDIF to blink on matching IF. |
| 189 | Also, from an ENDDO statement blink on matching DO [WHILE] statement." | 209 | Also, from an ENDDO statement blink on matching DO [WHILE] statement." |
| 190 | :type 'boolean | 210 | :type 'boolean |
| 191 | :group 'fortran) | 211 | :group 'fortran) |
| 212 | (put 'fortran-blink-matching-if 'safe-local-variable 'booleanp) | ||
| 192 | 213 | ||
| 193 | (defcustom fortran-continuation-string "$" | 214 | (defcustom fortran-continuation-string "$" |
| 194 | "*Single-character string used for Fortran continuation lines. | 215 | "*Single-character string used for Fortran continuation lines. |
| @@ -199,17 +220,22 @@ line, it will convert the line into a continuation line of the | |||
| 199 | appropriate style. Normally $." | 220 | appropriate style. Normally $." |
| 200 | :type 'string | 221 | :type 'string |
| 201 | :group 'fortran) | 222 | :group 'fortran) |
| 223 | (put 'fortran-continuation-string 'safe-local-variable | ||
| 224 | (lambda (value) (and (stringp value) | ||
| 225 | (= (length value) 1)))) | ||
| 202 | 226 | ||
| 203 | (defcustom fortran-comment-region "c$$$" | 227 | (defcustom fortran-comment-region "c$$$" |
| 204 | "*String inserted by \\[fortran-comment-region] at start of each \ | 228 | "*String inserted by \\[fortran-comment-region] at start of each \ |
| 205 | line in region." | 229 | line in region." |
| 206 | :type 'string | 230 | :type 'string |
| 207 | :group 'fortran-comment) | 231 | :group 'fortran-comment) |
| 232 | (put 'fortran-comment-region 'safe-local-variable 'stringp) | ||
| 208 | 233 | ||
| 209 | (defcustom fortran-electric-line-number t | 234 | (defcustom fortran-electric-line-number t |
| 210 | "*Non-nil causes line numbers to be moved to the correct column as typed." | 235 | "*Non-nil causes line numbers to be moved to the correct column as typed." |
| 211 | :type 'boolean | 236 | :type 'boolean |
| 212 | :group 'fortran) | 237 | :group 'fortran) |
| 238 | (put 'fortran-electric-line-number 'safe-local-variable 'booleanp) | ||
| 213 | 239 | ||
| 214 | (defcustom fortran-column-ruler-fixed | 240 | (defcustom fortran-column-ruler-fixed |
| 215 | "0 4 6 10 20 30 40 5\ | 241 | "0 4 6 10 20 30 40 5\ |
| @@ -221,6 +247,7 @@ This variable is used in fixed format mode. | |||
| 221 | See the variable `fortran-column-ruler-tab' for TAB format mode." | 247 | See the variable `fortran-column-ruler-tab' for TAB format mode." |
| 222 | :type 'string | 248 | :type 'string |
| 223 | :group 'fortran) | 249 | :group 'fortran) |
| 250 | (put 'fortran-column-ruler-fixed 'safe-local-variable 'stringp) | ||
| 224 | 251 | ||
| 225 | (defcustom fortran-column-ruler-tab | 252 | (defcustom fortran-column-ruler-tab |
| 226 | "0 810 20 30 40 5\ | 253 | "0 810 20 30 40 5\ |
| @@ -232,17 +259,20 @@ This variable is used in TAB format mode. | |||
| 232 | See the variable `fortran-column-ruler-fixed' for fixed format mode." | 259 | See the variable `fortran-column-ruler-fixed' for fixed format mode." |
| 233 | :type 'string | 260 | :type 'string |
| 234 | :group 'fortran) | 261 | :group 'fortran) |
| 262 | (put 'fortran-column-ruler-tab 'safe-local-variable 'stringp) | ||
| 235 | 263 | ||
| 236 | (defcustom fortran-analyze-depth 100 | 264 | (defcustom fortran-analyze-depth 100 |
| 237 | "Number of lines to scan to identify fixed or TAB format style." | 265 | "Number of lines to scan to identify fixed or TAB format style." |
| 238 | :type 'integer | 266 | :type 'integer |
| 239 | :group 'fortran) | 267 | :group 'fortran) |
| 268 | (put 'fortran-analyze-depth 'safe-local-variable 'integerp) | ||
| 240 | 269 | ||
| 241 | (defcustom fortran-break-before-delimiters t | 270 | (defcustom fortran-break-before-delimiters t |
| 242 | "*Non-nil causes filling to break lines before delimiters. | 271 | "*Non-nil causes filling to break lines before delimiters. |
| 243 | Delimiters are characters matching the regexp `fortran-break-delimiters-re'." | 272 | Delimiters are characters matching the regexp `fortran-break-delimiters-re'." |
| 244 | :type 'boolean | 273 | :type 'boolean |
| 245 | :group 'fortran) | 274 | :group 'fortran) |
| 275 | (put 'fortran-break-before-delimiters 'safe-local-variable 'booleanp) | ||
| 246 | 276 | ||
| 247 | (defconst fortran-break-delimiters-re "[-+*/><=, \t]" | 277 | (defconst fortran-break-delimiters-re "[-+*/><=, \t]" |
| 248 | "Regexp matching delimiter characters at which lines may be broken. | 278 | "Regexp matching delimiter characters at which lines may be broken. |