summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2006-12-05 05:24:48 +0000
committerGlenn Morris <rgm@gnu.org>2006-12-05 05:24:48 +0000
commit9ab66fc7585f55442ded2d9c398cf30e2a0709ca (patch)
tree99bf494c7c0ea2ffd1c2b28f367efd2470d30254 /lisp
parent0761b294e1c6815b5f54d71fec1296ea3baa7410 (diff)
downloademacs-9ab66fc7585f55442ded2d9c398cf30e2a0709ca.tar.gz
(fortran-mode-abbrev-table): Define abbrevs even if abbrev-table is
non-nil (saved user abbrevs may have been restored).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/fortran.el144
1 files changed, 73 insertions, 71 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index fcc9db1c3ef..5c97f60e204 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -604,80 +604,82 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
(defvar fortran-mode-abbrev-table
- (let (abbrevs-changed)
+ (progn
(define-abbrev-table 'fortran-mode-abbrev-table nil)
- ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
- ;; Only use `apply' to quieten the byte-compiler.
- (mapcar
- (function (lambda (element)
- (condition-case nil
- (apply 'define-abbrev fortran-mode-abbrev-table
- (append element '(nil 0 t)))
- (wrong-number-of-arguments
- (apply 'define-abbrev fortran-mode-abbrev-table
- (append element '(nil 0)))))))
- '((";au" "automatic" )
- (";b" "byte" )
- (";bd" "block data" )
- (";ch" "character" )
- (";cl" "close" )
- (";c" "continue" )
- (";cm" "common" )
- (";cx" "complex" )
- (";df" "define" )
- (";di" "dimension" )
- (";do" "double" )
- (";dc" "double complex" )
- (";dp" "double precision" )
- (";dw" "do while" )
- (";e" "else" )
- (";ed" "enddo" )
- (";el" "elseif" )
- (";en" "endif" )
- (";eq" "equivalence" )
- (";ew" "endwhere" )
- (";ex" "external" )
- (";ey" "entry" )
- (";f" "format" )
- (";fa" ".false." )
- (";fu" "function" )
- (";g" "goto" )
- (";im" "implicit" )
- (";ib" "implicit byte" )
- (";ic" "implicit complex" )
- (";ich" "implicit character")
- (";ii" "implicit integer" )
- (";il" "implicit logical" )
- (";ir" "implicit real" )
- (";inc" "include" )
- (";in" "integer" )
- (";intr" "intrinsic" )
- (";l" "logical" )
- (";n" "namelist" )
- (";o" "open" ) ; was ;op
- (";pa" "parameter" )
- (";pr" "program" )
- (";ps" "pause" )
- (";p" "print" )
- (";rc" "record" )
- (";re" "real" )
- (";r" "read" )
- (";rt" "return" )
- (";rw" "rewind" )
- (";s" "stop" )
- (";sa" "save" )
- (";st" "structure" )
- (";sc" "static" )
- (";su" "subroutine" )
- (";tr" ".true." )
- (";ty" "type" )
- (";vo" "volatile" )
- (";w" "write" )
- (";wh" "where" )))
- fortran-mode-abbrev-table))
+ fortran-mode-abbrev-table)
+ "Abbrev table for Fortran mode.")
+
+(let (abbrevs-changed)
+ ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
+ ;; Only use `apply' to quieten the byte-compiler.
+ (mapcar
+ (function (lambda (element)
+ (condition-case nil
+ (apply 'define-abbrev fortran-mode-abbrev-table
+ (append element '(nil 0 t)))
+ (wrong-number-of-arguments
+ (apply 'define-abbrev fortran-mode-abbrev-table
+ (append element '(nil 0)))))))
+ '((";au" "automatic" )
+ (";b" "byte" )
+ (";bd" "block data" )
+ (";ch" "character" )
+ (";cl" "close" )
+ (";c" "continue" )
+ (";cm" "common" )
+ (";cx" "complex" )
+ (";df" "define" )
+ (";di" "dimension" )
+ (";do" "double" )
+ (";dc" "double complex" )
+ (";dp" "double precision" )
+ (";dw" "do while" )
+ (";e" "else" )
+ (";ed" "enddo" )
+ (";el" "elseif" )
+ (";en" "endif" )
+ (";eq" "equivalence" )
+ (";ew" "endwhere" )
+ (";ex" "external" )
+ (";ey" "entry" )
+ (";f" "format" )
+ (";fa" ".false." )
+ (";fu" "function" )
+ (";g" "goto" )
+ (";im" "implicit" )
+ (";ib" "implicit byte" )
+ (";ic" "implicit complex" )
+ (";ich" "implicit character")
+ (";ii" "implicit integer" )
+ (";il" "implicit logical" )
+ (";ir" "implicit real" )
+ (";inc" "include" )
+ (";in" "integer" )
+ (";intr" "intrinsic" )
+ (";l" "logical" )
+ (";n" "namelist" )
+ (";o" "open" ) ; was ;op
+ (";pa" "parameter" )
+ (";pr" "program" )
+ (";ps" "pause" )
+ (";p" "print" )
+ (";rc" "record" )
+ (";re" "real" )
+ (";r" "read" )
+ (";rt" "return" )
+ (";rw" "rewind" )
+ (";s" "stop" )
+ (";sa" "save" )
+ (";st" "structure" )
+ (";sc" "static" )
+ (";su" "subroutine" )
+ (";tr" ".true." )
+ (";ty" "type" )
+ (";vo" "volatile" )
+ (";w" "write" )
+ (";wh" "where" ))))
-
;;;###autoload
(defun fortran-mode ()
"Major mode for editing Fortran code in fixed format.