]> git.eshelyaron.com Git - emacs.git/commitdiff
(f90-do-indent, f90-if-indent)
authorGlenn Morris <rgm@gnu.org>
Tue, 23 Oct 2007 07:00:13 +0000 (07:00 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 23 Oct 2007 07:00:13 +0000 (07:00 +0000)
(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.

lisp/progmodes/f90.el

index 302917e276989610e11aa6e6e3cf01a84f43076c..121f1b6cf147aa8ba149eee6186477fa9d3ea797 100644 (file)
   "*Extra indentation applied to DO blocks."
   :type  'integer
   :group 'f90-indent)
+(put 'f90-do-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-if-indent 3
   "*Extra indentation applied to IF, SELECT CASE, WHERE and FORALL blocks."
   :type  'integer
   :group 'f90-indent)
+(put 'f90-if-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-type-indent 3
   "*Extra indentation applied to TYPE, INTERFACE and BLOCK DATA blocks."
   :type  'integer
   :group 'f90-indent)
+(put 'f90-type-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-program-indent 2
   "*Extra indentation applied to PROGRAM, MODULE, SUBROUTINE, FUNCTION blocks."
   :type  'integer
   :group 'f90-indent)
+(put 'f90-program-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-continuation-indent 5
   "*Extra indentation applied to continuation lines."
   :type  'integer
   :group 'f90-indent)
+(put 'f90-continuation-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-comment-region "!!$"
   "*String inserted by \\[f90-comment-region] at start of each line in region."
   :type  'string
   :group 'f90-indent)
+(put 'f90-comment-region 'safe-local-variable 'stringp)
 
 (defcustom f90-indented-comment-re "!"
   "*Regexp matching comments to indent as code."
   :type  'regexp
   :group 'f90-indent)
+;; FIXME are arbitrary regexps safe? Only used in looking-at.
 
 (defcustom f90-directive-comment-re "!hpf\\$"
   "*Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented."
   :type  'regexp
   :group 'f90-indent)
+;; FIXME are arbitrary regexps safe? Only used in looking-at.
 
 (defcustom f90-beginning-ampersand t
   "*Non-nil gives automatic insertion of \& at start of continuation line."
   :type  'boolean
   :group 'f90)
+(put 'f90-beginning-ampersand 'safe-local-variable 'booleanp)
 
 (defcustom f90-smart-end 'blink
   "*Qualification of END statements according to the matching block start.
@@ -227,6 +236,8 @@ The other two settings have the same effect, but 'blink
 additionally blinks the cursor to the start of the block."
   :type  '(choice (const blink) (const no-blink) (const nil))
   :group 'f90)
+(put 'f90-smart-end 'safe-local-variable
+     (lambda (value) (memq value '(blink no-blink nil))))
 
 (defcustom f90-break-delimiters "[-+\\*/><=,% \t]"
   "*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
 specified by the constant `f90-no-break-re'."
   :type  'regexp
   :group 'f90)
+;; FIXME are arbitrary regexps safe? Used in re-search-backward.
 
 (defcustom f90-break-before-delimiters t
   "*Non-nil causes `f90-do-auto-fill' to break lines before delimiters."
   :type  'boolean
   :group 'f90)
+(put 'f90-break-before-delimiters 'safe-local-variable 'booleanp)
 
 (defcustom f90-auto-keyword-case nil
   "*Automatic case conversion of keywords.
@@ -247,17 +260,23 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
   :type  '(choice (const downcase-word) (const upcase-word)
                   (const capitalize-word) (const nil))
   :group 'f90)
+(put 'f90-auto-keyword-case 'safe-local-variable
+     (lambda (value) (memq value '(downcase-word
+                                   capitalize-word upcase-word nil))))
 
 (defcustom f90-leave-line-no nil
   "*If non-nil, line numbers are not left justified."
   :type  'boolean
   :group 'f90)
+(put 'f90-leave-line-no 'safe-local-variable 'booleanp)
 
 (defcustom f90-mode-hook nil
   "Hook run when entering F90 mode."
   :type    'hook
   :options '(f90-add-imenu-menu)
   :group   'f90)
+(put 'f90-mode-hook 'safe-local-variable
+     (lambda (value) (member value '((f90-add-imenu-menu) nil))))
 
 ;; User options end here.
 
@@ -393,7 +412,7 @@ do\\([ \t]*while\\)?\\|select[ \t]*case\\|where\\|forall\\)\\)\\>"
     '("\\<\\(exit\\|cycle\\)[ \t]*\\(\\sw+\\)?\\>"
       (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
     '("\\<\\(case\\)[ \t]*\\(default\\|(\\)" . 1)
-    '("\\<\\(do\\|go *to\\)\\>[ \t]*\\([0-9]+\\)"
+    '("\\<\\(do\\|go[ \t]*to\\)\\>[ \t]*\\([0-9]+\\)"
       (1 font-lock-keyword-face) (2 font-lock-constant-face))
     ;; Line numbers (lines whose first character after number is letter).
     '("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t))))
@@ -1223,7 +1242,7 @@ Return (TYPE NAME), or nil if not found."
 Return (TYPE NAME), or nil if not found."
   (interactive)
   (let ((case-fold-search t)
-        (count 1) 
+        (count 1)
         matching-end)
     (end-of-line)
     (while (and (> count 0)