diff options
| author | Glenn Morris | 2006-12-05 05:24:24 +0000 |
|---|---|---|
| committer | Glenn Morris | 2006-12-05 05:24:24 +0000 |
| commit | 0761b294e1c6815b5f54d71fec1296ea3baa7410 (patch) | |
| tree | 138d00f51ccd1bdb9b6f8e5b429741165cbfc0bd | |
| parent | 449657e878a7c33e9deb9ce30cfdd6ac365268d0 (diff) | |
| download | emacs-0761b294e1c6815b5f54d71fec1296ea3baa7410.tar.gz emacs-0761b294e1c6815b5f54d71fec1296ea3baa7410.zip | |
(f90-mode-abbrev-table): Define abbrevs even if abbrev-table is
non-nil (saved user abbrevs may have been restored).
| -rw-r--r-- | lisp/progmodes/f90.el | 134 |
1 files changed, 68 insertions, 66 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 6b0a44f44ab..e1cd25934f8 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -674,76 +674,78 @@ Used in the F90 entry in `hs-special-modes-alist'.") | |||
| 674 | 674 | ||
| 675 | ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. | 675 | ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. |
| 676 | (defvar f90-mode-abbrev-table | 676 | (defvar f90-mode-abbrev-table |
| 677 | (let (abbrevs-changed) | 677 | (progn |
| 678 | (define-abbrev-table 'f90-mode-abbrev-table nil) | 678 | (define-abbrev-table 'f90-mode-abbrev-table nil) |
| 679 | ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible. | ||
| 680 | ;; A little baroque to quieten the byte-compiler. | ||
| 681 | (mapcar | ||
| 682 | (function (lambda (element) | ||
| 683 | (condition-case nil | ||
| 684 | (apply 'define-abbrev f90-mode-abbrev-table | ||
| 685 | (append element '(nil 0 t))) | ||
| 686 | (wrong-number-of-arguments | ||
| 687 | (apply 'define-abbrev f90-mode-abbrev-table | ||
| 688 | (append element '(nil 0))))))) | ||
| 689 | '(("`al" "allocate" ) | ||
| 690 | ("`ab" "allocatable" ) | ||
| 691 | ("`as" "assignment" ) | ||
| 692 | ("`ba" "backspace" ) | ||
| 693 | ("`bd" "block data" ) | ||
| 694 | ("`c" "character" ) | ||
| 695 | ("`cl" "close" ) | ||
| 696 | ("`cm" "common" ) | ||
| 697 | ("`cx" "complex" ) | ||
| 698 | ("`cn" "contains" ) | ||
| 699 | ("`cy" "cycle" ) | ||
| 700 | ("`de" "deallocate" ) | ||
| 701 | ("`df" "define" ) | ||
| 702 | ("`di" "dimension" ) | ||
| 703 | ("`dp" "double precision") | ||
| 704 | ("`dw" "do while" ) | ||
| 705 | ("`el" "else" ) | ||
| 706 | ("`eli" "else if" ) | ||
| 707 | ("`elw" "elsewhere" ) | ||
| 708 | ("`eq" "equivalence" ) | ||
| 709 | ("`ex" "external" ) | ||
| 710 | ("`ey" "entry" ) | ||
| 711 | ("`fl" "forall" ) | ||
| 712 | ("`fo" "format" ) | ||
| 713 | ("`fu" "function" ) | ||
| 714 | ("`fa" ".false." ) | ||
| 715 | ("`im" "implicit none") | ||
| 716 | ("`in" "include" ) | ||
| 717 | ("`i" "integer" ) | ||
| 718 | ("`it" "intent" ) | ||
| 719 | ("`if" "interface" ) | ||
| 720 | ("`lo" "logical" ) | ||
| 721 | ("`mo" "module" ) | ||
| 722 | ("`na" "namelist" ) | ||
| 723 | ("`nu" "nullify" ) | ||
| 724 | ("`op" "optional" ) | ||
| 725 | ("`pa" "parameter" ) | ||
| 726 | ("`po" "pointer" ) | ||
| 727 | ("`pr" "print" ) | ||
| 728 | ("`pi" "private" ) | ||
| 729 | ("`pm" "program" ) | ||
| 730 | ("`pu" "public" ) | ||
| 731 | ("`r" "real" ) | ||
| 732 | ("`rc" "recursive" ) | ||
| 733 | ("`rt" "return" ) | ||
| 734 | ("`rw" "rewind" ) | ||
| 735 | ("`se" "select" ) | ||
| 736 | ("`sq" "sequence" ) | ||
| 737 | ("`su" "subroutine" ) | ||
| 738 | ("`ta" "target" ) | ||
| 739 | ("`tr" ".true." ) | ||
| 740 | ("`t" "type" ) | ||
| 741 | ("`wh" "where" ) | ||
| 742 | ("`wr" "write" ))) | ||
| 743 | f90-mode-abbrev-table) | 679 | f90-mode-abbrev-table) |
| 744 | "Abbrev table for F90 mode.") | 680 | "Abbrev table for F90 mode.") |
| 745 | |||
| 746 | 681 | ||
| 682 | (let (abbrevs-changed) | ||
| 683 | ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible. | ||
| 684 | ;; A little baroque to quieten the byte-compiler. | ||
| 685 | (mapcar | ||
| 686 | (function (lambda (element) | ||
| 687 | (condition-case nil | ||
| 688 | (apply 'define-abbrev f90-mode-abbrev-table | ||
| 689 | (append element '(nil 0 t))) | ||
| 690 | (wrong-number-of-arguments | ||
| 691 | (apply 'define-abbrev f90-mode-abbrev-table | ||
| 692 | (append element '(nil 0))))))) | ||
| 693 | '(("`al" "allocate" ) | ||
| 694 | ("`ab" "allocatable" ) | ||
| 695 | ("`as" "assignment" ) | ||
| 696 | ("`ba" "backspace" ) | ||
| 697 | ("`bd" "block data" ) | ||
| 698 | ("`c" "character" ) | ||
| 699 | ("`cl" "close" ) | ||
| 700 | ("`cm" "common" ) | ||
| 701 | ("`cx" "complex" ) | ||
| 702 | ("`cn" "contains" ) | ||
| 703 | ("`cy" "cycle" ) | ||
| 704 | ("`de" "deallocate" ) | ||
| 705 | ("`df" "define" ) | ||
| 706 | ("`di" "dimension" ) | ||
| 707 | ("`dp" "double precision") | ||
| 708 | ("`dw" "do while" ) | ||
| 709 | ("`el" "else" ) | ||
| 710 | ("`eli" "else if" ) | ||
| 711 | ("`elw" "elsewhere" ) | ||
| 712 | ("`eq" "equivalence" ) | ||
| 713 | ("`ex" "external" ) | ||
| 714 | ("`ey" "entry" ) | ||
| 715 | ("`fl" "forall" ) | ||
| 716 | ("`fo" "format" ) | ||
| 717 | ("`fu" "function" ) | ||
| 718 | ("`fa" ".false." ) | ||
| 719 | ("`im" "implicit none") | ||
| 720 | ("`in" "include" ) | ||
| 721 | ("`i" "integer" ) | ||
| 722 | ("`it" "intent" ) | ||
| 723 | ("`if" "interface" ) | ||
| 724 | ("`lo" "logical" ) | ||
| 725 | ("`mo" "module" ) | ||
| 726 | ("`na" "namelist" ) | ||
| 727 | ("`nu" "nullify" ) | ||
| 728 | ("`op" "optional" ) | ||
| 729 | ("`pa" "parameter" ) | ||
| 730 | ("`po" "pointer" ) | ||
| 731 | ("`pr" "print" ) | ||
| 732 | ("`pi" "private" ) | ||
| 733 | ("`pm" "program" ) | ||
| 734 | ("`pu" "public" ) | ||
| 735 | ("`r" "real" ) | ||
| 736 | ("`rc" "recursive" ) | ||
| 737 | ("`rt" "return" ) | ||
| 738 | ("`rw" "rewind" ) | ||
| 739 | ("`se" "select" ) | ||
| 740 | ("`sq" "sequence" ) | ||
| 741 | ("`su" "subroutine" ) | ||
| 742 | ("`ta" "target" ) | ||
| 743 | ("`tr" ".true." ) | ||
| 744 | ("`t" "type" ) | ||
| 745 | ("`wh" "where" ) | ||
| 746 | ("`wr" "write" )))) | ||
| 747 | |||
| 748 | |||
| 747 | ;;;###autoload | 749 | ;;;###autoload |
| 748 | (defun f90-mode () | 750 | (defun f90-mode () |
| 749 | "Major mode for editing Fortran 90,95 code in free format. | 751 | "Major mode for editing Fortran 90,95 code in free format. |