aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2007-10-23 07:00:13 +0000
committerGlenn Morris2007-10-23 07:00:13 +0000
commitd6bb9d8c180f173991e3bae84a74a9d487e094f8 (patch)
tree885a4f080845f75e21de1cf680236e09a217777d /lisp
parent239b692e5c34dbd7a79db11636b4eab421fd6ec3 (diff)
downloademacs-d6bb9d8c180f173991e3bae84a74a9d487e094f8.tar.gz
emacs-d6bb9d8c180f173991e3bae84a74a9d487e094f8.zip
(f90-do-indent, f90-if-indent)
(f90-type-indent, f90-program-indent) (f90-continuation-indent, f90-comment-region) (f90-beginning-ampersand, f90-smart-end) (f90-break-before-delimiters, f90-auto-keyword-case) (f90-leave-line-no, f90-mode-hook): Give an appropriate safe-local-variable property. (f90-font-lock-keywords-2): Fix `go to' regexp.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/f90.el23
1 files changed, 21 insertions, 2 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 302917e2769..121f1b6cf14 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -177,46 +177,55 @@
177 "*Extra indentation applied to DO blocks." 177 "*Extra indentation applied to DO blocks."
178 :type 'integer 178 :type 'integer
179 :group 'f90-indent) 179 :group 'f90-indent)
180(put 'f90-do-indent 'safe-local-variable 'integerp)
180 181
181(defcustom f90-if-indent 3 182(defcustom f90-if-indent 3
182 "*Extra indentation applied to IF, SELECT CASE, WHERE and FORALL blocks." 183 "*Extra indentation applied to IF, SELECT CASE, WHERE and FORALL blocks."
183 :type 'integer 184 :type 'integer
184 :group 'f90-indent) 185 :group 'f90-indent)
186(put 'f90-if-indent 'safe-local-variable 'integerp)
185 187
186(defcustom f90-type-indent 3 188(defcustom f90-type-indent 3
187 "*Extra indentation applied to TYPE, INTERFACE and BLOCK DATA blocks." 189 "*Extra indentation applied to TYPE, INTERFACE and BLOCK DATA blocks."
188 :type 'integer 190 :type 'integer
189 :group 'f90-indent) 191 :group 'f90-indent)
192(put 'f90-type-indent 'safe-local-variable 'integerp)
190 193
191(defcustom f90-program-indent 2 194(defcustom f90-program-indent 2
192 "*Extra indentation applied to PROGRAM, MODULE, SUBROUTINE, FUNCTION blocks." 195 "*Extra indentation applied to PROGRAM, MODULE, SUBROUTINE, FUNCTION blocks."
193 :type 'integer 196 :type 'integer
194 :group 'f90-indent) 197 :group 'f90-indent)
198(put 'f90-program-indent 'safe-local-variable 'integerp)
195 199
196(defcustom f90-continuation-indent 5 200(defcustom f90-continuation-indent 5
197 "*Extra indentation applied to continuation lines." 201 "*Extra indentation applied to continuation lines."
198 :type 'integer 202 :type 'integer
199 :group 'f90-indent) 203 :group 'f90-indent)
204(put 'f90-continuation-indent 'safe-local-variable 'integerp)
200 205
201(defcustom f90-comment-region "!!$" 206(defcustom f90-comment-region "!!$"
202 "*String inserted by \\[f90-comment-region] at start of each line in region." 207 "*String inserted by \\[f90-comment-region] at start of each line in region."
203 :type 'string 208 :type 'string
204 :group 'f90-indent) 209 :group 'f90-indent)
210(put 'f90-comment-region 'safe-local-variable 'stringp)
205 211
206(defcustom f90-indented-comment-re "!" 212(defcustom f90-indented-comment-re "!"
207 "*Regexp matching comments to indent as code." 213 "*Regexp matching comments to indent as code."
208 :type 'regexp 214 :type 'regexp
209 :group 'f90-indent) 215 :group 'f90-indent)
216;; FIXME are arbitrary regexps safe? Only used in looking-at.
210 217
211(defcustom f90-directive-comment-re "!hpf\\$" 218(defcustom f90-directive-comment-re "!hpf\\$"
212 "*Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented." 219 "*Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented."
213 :type 'regexp 220 :type 'regexp
214 :group 'f90-indent) 221 :group 'f90-indent)
222;; FIXME are arbitrary regexps safe? Only used in looking-at.
215 223
216(defcustom f90-beginning-ampersand t 224(defcustom f90-beginning-ampersand t
217 "*Non-nil gives automatic insertion of \& at start of continuation line." 225 "*Non-nil gives automatic insertion of \& at start of continuation line."
218 :type 'boolean 226 :type 'boolean
219 :group 'f90) 227 :group 'f90)
228(put 'f90-beginning-ampersand 'safe-local-variable 'booleanp)
220 229
221(defcustom f90-smart-end 'blink 230(defcustom f90-smart-end 'blink
222 "*Qualification of END statements according to the matching block start. 231 "*Qualification of END statements according to the matching block start.
@@ -227,6 +236,8 @@ The other two settings have the same effect, but 'blink
227additionally blinks the cursor to the start of the block." 236additionally blinks the cursor to the start of the block."
228 :type '(choice (const blink) (const no-blink) (const nil)) 237 :type '(choice (const blink) (const no-blink) (const nil))
229 :group 'f90) 238 :group 'f90)
239(put 'f90-smart-end 'safe-local-variable
240 (lambda (value) (memq value '(blink no-blink nil))))
230 241
231(defcustom f90-break-delimiters "[-+\\*/><=,% \t]" 242(defcustom f90-break-delimiters "[-+\\*/><=,% \t]"
232 "*Regexp matching delimiter characters at which lines may be broken. 243 "*Regexp matching delimiter characters at which lines may be broken.
@@ -235,11 +246,13 @@ matching this regexp that should not be split, and these are
235specified by the constant `f90-no-break-re'." 246specified by the constant `f90-no-break-re'."
236 :type 'regexp 247 :type 'regexp
237 :group 'f90) 248 :group 'f90)
249;; FIXME are arbitrary regexps safe? Used in re-search-backward.
238 250
239(defcustom f90-break-before-delimiters t 251(defcustom f90-break-before-delimiters t
240 "*Non-nil causes `f90-do-auto-fill' to break lines before delimiters." 252 "*Non-nil causes `f90-do-auto-fill' to break lines before delimiters."
241 :type 'boolean 253 :type 'boolean
242 :group 'f90) 254 :group 'f90)
255(put 'f90-break-before-delimiters 'safe-local-variable 'booleanp)
243 256
244(defcustom f90-auto-keyword-case nil 257(defcustom f90-auto-keyword-case nil
245 "*Automatic case conversion of keywords. 258 "*Automatic case conversion of keywords.
@@ -247,17 +260,23 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
247 :type '(choice (const downcase-word) (const upcase-word) 260 :type '(choice (const downcase-word) (const upcase-word)
248 (const capitalize-word) (const nil)) 261 (const capitalize-word) (const nil))
249 :group 'f90) 262 :group 'f90)
263(put 'f90-auto-keyword-case 'safe-local-variable
264 (lambda (value) (memq value '(downcase-word
265 capitalize-word upcase-word nil))))
250 266
251(defcustom f90-leave-line-no nil 267(defcustom f90-leave-line-no nil
252 "*If non-nil, line numbers are not left justified." 268 "*If non-nil, line numbers are not left justified."
253 :type 'boolean 269 :type 'boolean
254 :group 'f90) 270 :group 'f90)
271(put 'f90-leave-line-no 'safe-local-variable 'booleanp)
255 272
256(defcustom f90-mode-hook nil 273(defcustom f90-mode-hook nil
257 "Hook run when entering F90 mode." 274 "Hook run when entering F90 mode."
258 :type 'hook 275 :type 'hook
259 :options '(f90-add-imenu-menu) 276 :options '(f90-add-imenu-menu)
260 :group 'f90) 277 :group 'f90)
278(put 'f90-mode-hook 'safe-local-variable
279 (lambda (value) (member value '((f90-add-imenu-menu) nil))))
261 280
262;; User options end here. 281;; User options end here.
263 282
@@ -393,7 +412,7 @@ do\\([ \t]*while\\)?\\|select[ \t]*case\\|where\\|forall\\)\\)\\>"
393 '("\\<\\(exit\\|cycle\\)[ \t]*\\(\\sw+\\)?\\>" 412 '("\\<\\(exit\\|cycle\\)[ \t]*\\(\\sw+\\)?\\>"
394 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) 413 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
395 '("\\<\\(case\\)[ \t]*\\(default\\|(\\)" . 1) 414 '("\\<\\(case\\)[ \t]*\\(default\\|(\\)" . 1)
396 '("\\<\\(do\\|go *to\\)\\>[ \t]*\\([0-9]+\\)" 415 '("\\<\\(do\\|go[ \t]*to\\)\\>[ \t]*\\([0-9]+\\)"
397 (1 font-lock-keyword-face) (2 font-lock-constant-face)) 416 (1 font-lock-keyword-face) (2 font-lock-constant-face))
398 ;; Line numbers (lines whose first character after number is letter). 417 ;; Line numbers (lines whose first character after number is letter).
399 '("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t)))) 418 '("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t))))
@@ -1223,7 +1242,7 @@ Return (TYPE NAME), or nil if not found."
1223Return (TYPE NAME), or nil if not found." 1242Return (TYPE NAME), or nil if not found."
1224 (interactive) 1243 (interactive)
1225 (let ((case-fold-search t) 1244 (let ((case-fold-search t)
1226 (count 1) 1245 (count 1)
1227 matching-end) 1246 matching-end)
1228 (end-of-line) 1247 (end-of-line)
1229 (while (and (> count 0) 1248 (while (and (> count 0)