emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog progmodes/f90.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp ChangeLog progmodes/f90.el
Date: Thu, 03 Sep 2009 06:41:51 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/09/03 06:41:50

Modified files:
        lisp           : ChangeLog 
        lisp/progmodes : f90.el 

Log message:
        Move all safe properties into the defcustoms.
        (f90-get-correct-indent, f90-indent-region, f90-abbrev-start): Use memq.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16089&r2=1.16090
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/f90.el?cvsroot=emacs&r1=1.121&r2=1.122

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16089
retrieving revision 1.16090
diff -u -b -r1.16089 -r1.16090
--- ChangeLog   3 Sep 2009 06:35:25 -0000       1.16089
+++ ChangeLog   3 Sep 2009 06:41:46 -0000       1.16090
@@ -1,5 +1,8 @@
 2009-09-03  Glenn Morris  <address@hidden>
 
+       * progmodes/f90.el: Move all safe properties into the defcustoms.
+       (f90-get-correct-indent, f90-indent-region, f90-abbrev-start): Use memq.
+
        * calendar/appt.el (appt-check):
        * calendar/diary-lib.el (diary-set-header, diary-live-p)
        (diary-check-diary-file, diary-list-entries)

Index: progmodes/f90.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/f90.el,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -b -r1.121 -r1.122
--- progmodes/f90.el    1 Jul 2009 07:13:59 -0000       1.121
+++ progmodes/f90.el    3 Sep 2009 06:41:50 -0000       1.122
@@ -182,63 +182,63 @@
 (defcustom f90-do-indent 3
   "Extra indentation applied to DO blocks."
   :type  'integer
+  :safe  'integerp
   :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
+  :safe  'integerp
   :group 'f90-indent)
-(put 'f90-if-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-type-indent 3
   "Extra indentation applied to TYPE, ENUM, INTERFACE and BLOCK DATA blocks."
   :type  'integer
+  :safe  'integerp
   :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
+  :safe  'integerp
   :group 'f90-indent)
-(put 'f90-program-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-associate-indent 2
   "Extra indentation applied to ASSOCIATE blocks."
   :type  'integer
+  :safe  'integerp
   :group 'f90-indent
   :version "23.1")
-(put 'f90-associate-indent 'safe-local-variable 'integerp)
 
 (defcustom f90-continuation-indent 5
   "Extra indentation applied to continuation lines."
   :type  'integer
+  :safe  'integerp
   :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
+  :safe  'stringp
   :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
+  :safe  'stringp
   :group 'f90-indent)
-(put 'f90-indented-comment-re 'safe-local-variable 'stringp)
 
 (defcustom f90-directive-comment-re "!hpf\\$"
   "Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented."
   :type  'regexp
+  :safe  'stringp
   :group 'f90-indent)
-(put 'f90-directive-comment-re 'safe-local-variable 'stringp)
 
 (defcustom f90-beginning-ampersand t
   "Non-nil gives automatic insertion of \& at start of continuation line."
   :type  'boolean
+  :safe  'booleanp
   :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.
@@ -248,9 +248,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))
+  :safe  (lambda (value) (memq value '(blink no-blink 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.
@@ -259,38 +258,37 @@
 within lexical tokens (provided the next line has a beginning ampersand),
 the constant `f90-no-break-re' ensures that such tokens are not split."
   :type  'regexp
+  :safe 'stringp
   :group 'f90)
-(put 'f90-break-delimiters 'safe-local-variable 'stringp)
 
 (defcustom f90-break-before-delimiters t
   "Non-nil causes `f90-do-auto-fill' to break lines before delimiters."
   :type  'boolean
+  :safe 'booleanp
   :group 'f90)
-(put 'f90-break-before-delimiters 'safe-local-variable 'booleanp)
 
 (defcustom f90-auto-keyword-case nil
   "Automatic case conversion of keywords.
 The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
   :type  '(choice (const downcase-word) (const upcase-word)
                   (const capitalize-word) (const nil))
+  :safe (lambda (value) (memq value '(downcase-word
+                                      capitalize-word upcase-word 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
+  :safe  'booleanp
   :group 'f90)
-(put 'f90-leave-line-no 'safe-local-variable 'booleanp)
 
 (defcustom f90-mode-hook nil
   "Hook run when entering F90 mode."
   :type    'hook
+  ;; Not the only safe options, but some common ones.
+  :safe    (lambda (value) (member value '((f90-add-imenu-menu) nil)))
   :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.
 
@@ -1358,9 +1356,8 @@
   (let ((epnt (line-end-position)) icol cont)
     (save-excursion
       (while (and (f90-previous-statement)
-                  (or (progn
-                        (setq cont (f90-present-statement-cont))
-                        (or (eq cont 'end) (eq cont 'middle)))
+                  (or (memq (setq cont (f90-present-statement-cont))
+                            '(middle end))
                       (looking-at "[ \t]*[0-9]"))))
       (setq icol (current-indentation))
       (beginning-of-line)
@@ -1779,7 +1776,7 @@
                        (zerop (forward-line 1)))
                 (< (point) end-region-mark)))
     (setq cont (f90-present-statement-cont))
-    (while (and (or (eq cont 'middle) (eq cont 'end))
+    (while (and (memq cont '(middle end))
                 (f90-previous-statement))
       (setq cont (f90-present-statement-cont)))
     ;; Process present line for beginning of block.
@@ -1907,6 +1904,8 @@
         (t (insert "&")
            (or no-update (f90-update-line))
            (newline 1)
+           ;; FIXME also need leading ampersand if split lexical token (eg ==).
+           ;; Or respect f90-no-break-re.
            (if f90-beginning-ampersand (insert "&"))))
   (indent-according-to-mode))
 
@@ -2104,7 +2103,7 @@
       (setq event (read-event)
             char event))
     ;; Insert char if not equal to `?', or if abbrev-mode is off.
-    (if (and abbrev-mode (or (eq char ??) (eq char help-char)))
+    (if (and abbrev-mode (memq char (list ?? help-char)))
         (f90-abbrev-help)
       (setq unread-command-events (list event)))))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]