]> git.eshelyaron.com Git - emacs.git/commitdiff
(f90-mode-abbrev-table): Define abbrevs even if abbrev-table is
authorGlenn Morris <rgm@gnu.org>
Tue, 5 Dec 2006 05:24:24 +0000 (05:24 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 5 Dec 2006 05:24:24 +0000 (05:24 +0000)
non-nil (saved user abbrevs may have been restored).

lisp/progmodes/f90.el

index 6b0a44f44abaffb35acbcaabe752a7b38ae31c2c..e1cd25934f8e718b25c4349323cced9e79b54273 100644 (file)
@@ -674,76 +674,78 @@ Used in the F90 entry in `hs-special-modes-alist'.")
 \f
 ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t.
 (defvar f90-mode-abbrev-table
-  (let (abbrevs-changed)
+  (progn
     (define-abbrev-table 'f90-mode-abbrev-table nil)
-    ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
-    ;; A little baroque to quieten the byte-compiler.
-    (mapcar
-     (function (lambda (element)
-                 (condition-case nil
-                     (apply 'define-abbrev f90-mode-abbrev-table
-                            (append element '(nil 0 t)))
-                   (wrong-number-of-arguments
-                    (apply 'define-abbrev f90-mode-abbrev-table
-                           (append element '(nil 0)))))))
-     '(("`al"  "allocate"     )
-       ("`ab"  "allocatable"  )
-       ("`as"  "assignment"   )
-       ("`ba"  "backspace"    )
-       ("`bd"  "block data"   )
-       ("`c"   "character"    )
-       ("`cl"  "close"        )
-       ("`cm"  "common"       )
-       ("`cx"  "complex"      )
-       ("`cn"  "contains"     )
-       ("`cy"  "cycle"        )
-       ("`de"  "deallocate"   )
-       ("`df"  "define"       )
-       ("`di"  "dimension"    )
-       ("`dp"  "double precision")
-       ("`dw"  "do while"     )
-       ("`el"  "else"         )
-       ("`eli" "else if"      )
-       ("`elw" "elsewhere"    )
-       ("`eq"  "equivalence"  )
-       ("`ex"  "external"     )
-       ("`ey"  "entry"        )
-       ("`fl"  "forall"       )
-       ("`fo"  "format"       )
-       ("`fu"  "function"     )
-       ("`fa"  ".false."      )
-       ("`im"  "implicit none")
-       ("`in"  "include"      )
-       ("`i"   "integer"      )
-       ("`it"  "intent"       )
-       ("`if"  "interface"    )
-       ("`lo"  "logical"      )
-       ("`mo"  "module"       )
-       ("`na"  "namelist"     )
-       ("`nu"  "nullify"      )
-       ("`op"  "optional"     )
-       ("`pa"  "parameter"    )
-       ("`po"  "pointer"      )
-       ("`pr"  "print"        )
-       ("`pi"  "private"      )
-       ("`pm"  "program"      )
-       ("`pu"  "public"       )
-       ("`r"   "real"         )
-       ("`rc"  "recursive"    )
-       ("`rt"  "return"       )
-       ("`rw"  "rewind"       )
-       ("`se"  "select"       )
-       ("`sq"  "sequence"     )
-       ("`su"  "subroutine"   )
-       ("`ta"  "target"       )
-       ("`tr"  ".true."       )
-       ("`t"   "type"         )
-       ("`wh"  "where"        )
-       ("`wr"  "write"        )))
     f90-mode-abbrev-table)
   "Abbrev table for F90 mode.")
-\f
 
+(let (abbrevs-changed)
+  ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
+  ;; A little baroque to quieten the byte-compiler.
+  (mapcar
+   (function (lambda (element)
+               (condition-case nil
+                   (apply 'define-abbrev f90-mode-abbrev-table
+                          (append element '(nil 0 t)))
+                 (wrong-number-of-arguments
+                  (apply 'define-abbrev f90-mode-abbrev-table
+                         (append element '(nil 0)))))))
+   '(("`al"  "allocate"     )
+     ("`ab"  "allocatable"  )
+     ("`as"  "assignment"   )
+     ("`ba"  "backspace"    )
+     ("`bd"  "block data"   )
+     ("`c"   "character"    )
+     ("`cl"  "close"        )
+     ("`cm"  "common"       )
+     ("`cx"  "complex"      )
+     ("`cn"  "contains"     )
+     ("`cy"  "cycle"        )
+     ("`de"  "deallocate"   )
+     ("`df"  "define"       )
+     ("`di"  "dimension"    )
+     ("`dp"  "double precision")
+     ("`dw"  "do while"     )
+     ("`el"  "else"         )
+     ("`eli" "else if"      )
+     ("`elw" "elsewhere"    )
+     ("`eq"  "equivalence"  )
+     ("`ex"  "external"     )
+     ("`ey"  "entry"        )
+     ("`fl"  "forall"       )
+     ("`fo"  "format"       )
+     ("`fu"  "function"     )
+     ("`fa"  ".false."      )
+     ("`im"  "implicit none")
+     ("`in"  "include"      )
+     ("`i"   "integer"      )
+     ("`it"  "intent"       )
+     ("`if"  "interface"    )
+     ("`lo"  "logical"      )
+     ("`mo"  "module"       )
+     ("`na"  "namelist"     )
+     ("`nu"  "nullify"      )
+     ("`op"  "optional"     )
+     ("`pa"  "parameter"    )
+     ("`po"  "pointer"      )
+     ("`pr"  "print"        )
+     ("`pi"  "private"      )
+     ("`pm"  "program"      )
+     ("`pu"  "public"       )
+     ("`r"   "real"         )
+     ("`rc"  "recursive"    )
+     ("`rt"  "return"       )
+     ("`rw"  "rewind"       )
+     ("`se"  "select"       )
+     ("`sq"  "sequence"     )
+     ("`su"  "subroutine"   )
+     ("`ta"  "target"       )
+     ("`tr"  ".true."       )
+     ("`t"   "type"         )
+     ("`wh"  "where"        )
+     ("`wr"  "write"        ))))
+
+\f
 ;;;###autoload
 (defun f90-mode ()
   "Major mode for editing Fortran 90,95 code in free format.