[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/progmodes fortran.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp/progmodes fortran.el |
Date: |
Thu, 10 Sep 2009 06:19:54 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/09/10 06:19:54
Modified files:
lisp/progmodes : fortran.el
Log message:
Move all safe and risky properties into the defcustoms.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/fortran.el?cvsroot=emacs&r1=1.154&r2=1.155
Patches:
Index: fortran.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/fortran.el,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -b -r1.154 -r1.155
--- fortran.el 30 Aug 2009 01:38:13 -0000 1.154
+++ fortran.el 10 Sep 2009 06:19:53 -0000 1.155
@@ -83,8 +83,8 @@
A value of nil specifies that continuation lines are marked
with a character in column 6."
:type 'boolean
+ :safe 'booleanp
:group 'fortran-indent)
-(put 'fortran-tab-mode-default 'safe-local-variable 'booleanp)
;; TODO add more detail of what tab mode is to doc string.
(defcustom fortran-tab-mode-string
@@ -99,32 +99,32 @@
"String to appear in mode line in TAB format buffers.
See Info node `(emacs)ForIndent Cont'."
:type 'string
+ :risky t
:group 'fortran-indent)
-(put 'fortran-tab-mode-string 'risky-local-variable t)
(defcustom fortran-do-indent 3
"Extra indentation applied to DO blocks."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-do-indent 'safe-local-variable 'integerp)
(defcustom fortran-if-indent 3
"Extra indentation applied to IF, SELECT CASE and WHERE blocks."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-if-indent 'safe-local-variable 'integerp)
(defcustom fortran-structure-indent 3
"Extra indentation applied to STRUCTURE, UNION, MAP and INTERFACE blocks."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-structure-indent 'safe-local-variable 'integerp)
(defcustom fortran-continuation-indent 5
"Extra indentation applied to continuation lines."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-continuation-indent 'safe-local-variable 'integerp)
(defcustom fortran-comment-indent-style 'fixed
"How to indent comments.
@@ -135,16 +135,15 @@
`relative' indents to current Fortran indentation plus
`fortran-comment-line-extra-indent'."
:type '(radio (const :tag "Untouched" nil) (const fixed) (const relative))
+ :safe (lambda (value) (memq value '(nil fixed relative)))
:group 'fortran-indent)
-(put 'fortran-comment-indent 'safe-local-variable
- (lambda (value) (memq value '(nil fixed relative))))
(defcustom fortran-comment-line-extra-indent 0
"Amount of extra indentation for text within full-line comments."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent
:group 'fortran-comment)
-(put 'fortran-comment-line-extra-indent 'safe-local-variable 'integerp)
(defcustom fortran-comment-line-start "C"
"Delimiter inserted to start new full-line comment.
@@ -152,8 +151,8 @@
allow trailing comments on a line."
:version "21.1"
:type 'string
+ :safe 'stringp
:group 'fortran-comment)
-(put 'fortran-comment-line-start 'safe-local-variable 'stringp)
;; This used to match preprocessor lines too, but that messes up
;; filling and doesn't seem to be necessary.
@@ -162,8 +161,8 @@
"Regexp to match the start of a full-line comment."
:version "21.1"
:type 'regexp
+ :safe 'stringp
:group 'fortran-comment)
-(put 'fortran-comment-line-start-skip 'safe-local-variable 'stringp)
(defcustom fortran-directive-re
"^[ \t]*#.*"
@@ -172,20 +171,20 @@
The matching line will be given zero indentation."
:version "22.1"
:type 'regexp
+ :safe 'stringp
:group 'fortran-indent)
-(put 'fortran-directive-re 'safe-local-variable 'stringp)
(defcustom fortran-minimum-statement-indent-fixed 6
"Minimum statement indentation for fixed format continuation style."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-minimum-statement-indent-fixed 'safe-local-variable 'integerp)
(defcustom fortran-minimum-statement-indent-tab (max tab-width 6)
"Minimum statement indentation for TAB format continuation style."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-minimum-statement-indent-tab 'safe-local-variable 'integerp)
;; Note that this is documented in the v18 manuals as being a string
;; of length one rather than a single character.
@@ -194,31 +193,29 @@
"Single-character string inserted for Fortran comment indentation.
Normally a space."
:type 'string
+ :safe (lambda (value) (or (characterp value)
+ (and (stringp value) (= (length value) 1))))
:group 'fortran-comment)
-(put 'fortran-comment-indent-char 'safe-local-variable
- (lambda (value) (or (characterp value)
- (and (stringp value)
- (= (length value) 1)))))
(defcustom fortran-line-number-indent 1
"Maximum indentation for Fortran line numbers.
5 means right-justify them within their five-column field."
:type 'integer
+ :safe 'integerp
:group 'fortran-indent)
-(put 'fortran-line-number-indent 'safe-local-variable 'integerp)
(defcustom fortran-check-all-num-for-matching-do nil
"Non-nil causes all numbered lines to be treated as possible DO loop ends."
:type 'boolean
+ :safe 'booleanp
:group 'fortran)
-(put 'fortran-check-all-num-for-matching-do 'safe-local-variable 'booleanp)
(defcustom fortran-blink-matching-if nil
"Non-nil causes \\[fortran-indent-line] on ENDIF to blink on matching IF.
Also, from an ENDDO statement blink on matching DO [WHILE] statement."
:type 'boolean
+ :safe 'booleanp
:group 'fortran)
-(put 'fortran-blink-matching-if 'safe-local-variable 'booleanp)
(defcustom fortran-continuation-string "$"
"Single-character string used for Fortran continuation lines.
@@ -228,23 +225,21 @@
line, it will convert the line into a continuation line of the
appropriate style. Normally \"$\"."
:type 'string
+ :safe (lambda (value) (and (stringp value) (= (length value) 1)))
:group 'fortran)
-(put 'fortran-continuation-string 'safe-local-variable
- (lambda (value) (and (stringp value)
- (= (length value) 1))))
(defcustom fortran-comment-region "c$$$"
"String inserted by \\[fortran-comment-region] at start of each \
line in region."
:type 'string
+ :safe 'stringp
:group 'fortran-comment)
-(put 'fortran-comment-region 'safe-local-variable 'stringp)
(defcustom fortran-electric-line-number t
"Non-nil causes line numbers to be moved to the correct column as typed."
:type 'boolean
+ :safe 'booleanp
:group 'fortran)
-(put 'fortran-electric-line-number 'safe-local-variable 'booleanp)
;; TODO use fortran-line-length, somehow.
(defcustom fortran-column-ruler-fixed
@@ -256,8 +251,8 @@
This variable is used in fixed format mode.
See the variable `fortran-column-ruler-tab' for TAB format mode."
:type 'string
+ :safe 'stringp
:group 'fortran)
-(put 'fortran-column-ruler-fixed 'safe-local-variable 'stringp)
;; TODO use fortran-line-length, somehow.
(defcustom fortran-column-ruler-tab
@@ -269,21 +264,21 @@
This variable is used in TAB format mode.
See the variable `fortran-column-ruler-fixed' for fixed format mode."
:type 'string
+ :safe 'stringp
:group 'fortran)
-(put 'fortran-column-ruler-tab 'safe-local-variable 'stringp)
(defcustom fortran-analyze-depth 100
"Number of lines to scan to identify fixed or TAB format style."
:type 'integer
+ :safe 'integerp
:group 'fortran)
-(put 'fortran-analyze-depth 'safe-local-variable 'integerp)
(defcustom fortran-break-before-delimiters t
"Non-nil causes filling to break lines before delimiters.
Delimiters are characters matching the regexp `fortran-break-delimiters-re'."
:type 'boolean
+ :safe 'booleanp
:group 'fortran)
-(put 'fortran-break-before-delimiters 'safe-local-variable 'booleanp)
;; TODO 0 as no-limit, as per g77.
(defcustom fortran-line-length 72
@@ -296,6 +291,7 @@
buffer). This corresponds to the g77 compiler option
`-ffixed-line-length-N'."
:type 'integer
+ :safe 'integerp
:initialize 'custom-initialize-default
:set (lambda (symbol value)
;; Do all fortran buffers, and the default.
@@ -303,7 +299,6 @@
:version "23.1"
:group 'fortran)
-(put 'fortran-line-length 'safe-local-variable 'integerp)
(make-variable-buffer-local 'fortran-line-length)
(defcustom fortran-mode-hook nil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp/progmodes fortran.el,
Glenn Morris <=