diff options
| author | Glenn Morris | 2008-03-13 03:26:47 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-13 03:26:47 +0000 |
| commit | 34d11b923ee5609e37bbcd56999e7f3638b62a12 (patch) | |
| tree | 69e327e45c38ca1637f2de34b9a4bf78eb1e1c5d | |
| parent | 071e627782e4d44d645ee1207c06e36aab6717a5 (diff) | |
| download | emacs-34d11b923ee5609e37bbcd56999e7f3638b62a12.tar.gz emacs-34d11b923ee5609e37bbcd56999e7f3638b62a12.zip | |
(fortran-mode-abbrev-table): Use newer form of define-abbrev, where
supported. No need to bind abbrevs-changed for system abbrevs.
| -rw-r--r-- | lisp/progmodes/fortran.el | 135 |
1 files changed, 66 insertions, 69 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index a8d780753ff..fdd8ff75a27 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -676,75 +676,72 @@ Used in the Fortran entry in `hs-special-modes-alist'.") | |||
| 676 | fortran-mode-abbrev-table) | 676 | fortran-mode-abbrev-table) |
| 677 | "Abbrev table for Fortran mode.") | 677 | "Abbrev table for Fortran mode.") |
| 678 | 678 | ||
| 679 | (let (abbrevs-changed) | 679 | ;; Not in defvar because user abbrevs may be restored before this file loads. |
| 680 | ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible. | 680 | (mapc |
| 681 | ;; Only use `apply' to quieten the byte-compiler. | 681 | (lambda (e) |
| 682 | (mapc | 682 | (condition-case nil |
| 683 | (function (lambda (element) | 683 | (define-abbrev fortran-mode-abbrev-table (car e) (cdr e) nil :count 0 |
| 684 | (condition-case nil | 684 | :system t) |
| 685 | (apply 'define-abbrev fortran-mode-abbrev-table | 685 | (wrong-number-of-arguments ; Emacs 22 |
| 686 | (append element '(nil 0 t))) | 686 | (define-abbrev fortran-mode-abbrev-table (car e) (cdr e) nil 0 t)))) |
| 687 | (wrong-number-of-arguments | 687 | '((";au" . "automatic" ) |
| 688 | (apply 'define-abbrev fortran-mode-abbrev-table | 688 | (";b" . "byte" ) |
| 689 | (append element '(nil 0))))))) | 689 | (";bd" . "block data" ) |
| 690 | '((";au" "automatic" ) | 690 | (";ch" . "character" ) |
| 691 | (";b" "byte" ) | 691 | (";cl" . "close" ) |
| 692 | (";bd" "block data" ) | 692 | (";c" . "continue" ) |
| 693 | (";ch" "character" ) | 693 | (";cm" . "common" ) |
| 694 | (";cl" "close" ) | 694 | (";cx" . "complex" ) |
| 695 | (";c" "continue" ) | 695 | (";df" . "define" ) |
| 696 | (";cm" "common" ) | 696 | (";di" . "dimension" ) |
| 697 | (";cx" "complex" ) | 697 | (";do" . "double" ) |
| 698 | (";df" "define" ) | 698 | (";dc" . "double complex" ) |
| 699 | (";di" "dimension" ) | 699 | (";dp" . "double precision" ) |
| 700 | (";do" "double" ) | 700 | (";dw" . "do while" ) |
| 701 | (";dc" "double complex" ) | 701 | (";e" . "else" ) |
| 702 | (";dp" "double precision" ) | 702 | (";ed" . "enddo" ) |
| 703 | (";dw" "do while" ) | 703 | (";el" . "elseif" ) |
| 704 | (";e" "else" ) | 704 | (";en" . "endif" ) |
| 705 | (";ed" "enddo" ) | 705 | (";eq" . "equivalence" ) |
| 706 | (";el" "elseif" ) | 706 | (";ew" . "endwhere" ) |
| 707 | (";en" "endif" ) | 707 | (";ex" . "external" ) |
| 708 | (";eq" "equivalence" ) | 708 | (";ey" . "entry" ) |
| 709 | (";ew" "endwhere" ) | 709 | (";f" . "format" ) |
| 710 | (";ex" "external" ) | 710 | (";fa" . ".false." ) |
| 711 | (";ey" "entry" ) | 711 | (";fu" . "function" ) |
| 712 | (";f" "format" ) | 712 | (";g" . "goto" ) |
| 713 | (";fa" ".false." ) | 713 | (";im" . "implicit" ) |
| 714 | (";fu" "function" ) | 714 | (";ib" . "implicit byte" ) |
| 715 | (";g" "goto" ) | 715 | (";ic" . "implicit complex" ) |
| 716 | (";im" "implicit" ) | 716 | (";ich" . "implicit character") |
| 717 | (";ib" "implicit byte" ) | 717 | (";ii" . "implicit integer" ) |
| 718 | (";ic" "implicit complex" ) | 718 | (";il" . "implicit logical" ) |
| 719 | (";ich" "implicit character") | 719 | (";ir" . "implicit real" ) |
| 720 | (";ii" "implicit integer" ) | 720 | (";inc" . "include" ) |
| 721 | (";il" "implicit logical" ) | 721 | (";in" . "integer" ) |
| 722 | (";ir" "implicit real" ) | 722 | (";intr" . "intrinsic" ) |
| 723 | (";inc" "include" ) | 723 | (";l" . "logical" ) |
| 724 | (";in" "integer" ) | 724 | (";n" . "namelist" ) |
| 725 | (";intr" "intrinsic" ) | 725 | (";o" . "open" ) ; was ;op |
| 726 | (";l" "logical" ) | 726 | (";pa" . "parameter" ) |
| 727 | (";n" "namelist" ) | 727 | (";pr" . "program" ) |
| 728 | (";o" "open" ) ; was ;op | 728 | (";ps" . "pause" ) |
| 729 | (";pa" "parameter" ) | 729 | (";p" . "print" ) |
| 730 | (";pr" "program" ) | 730 | (";rc" . "record" ) |
| 731 | (";ps" "pause" ) | 731 | (";re" . "real" ) |
| 732 | (";p" "print" ) | 732 | (";r" . "read" ) |
| 733 | (";rc" "record" ) | 733 | (";rt" . "return" ) |
| 734 | (";re" "real" ) | 734 | (";rw" . "rewind" ) |
| 735 | (";r" "read" ) | 735 | (";s" . "stop" ) |
| 736 | (";rt" "return" ) | 736 | (";sa" . "save" ) |
| 737 | (";rw" "rewind" ) | 737 | (";st" . "structure" ) |
| 738 | (";s" "stop" ) | 738 | (";sc" . "static" ) |
| 739 | (";sa" "save" ) | 739 | (";su" . "subroutine" ) |
| 740 | (";st" "structure" ) | 740 | (";tr" . ".true." ) |
| 741 | (";sc" "static" ) | 741 | (";ty" . "type" ) |
| 742 | (";su" "subroutine" ) | 742 | (";vo" . "volatile" ) |
| 743 | (";tr" ".true." ) | 743 | (";w" . "write" ) |
| 744 | (";ty" "type" ) | 744 | (";wh" . "where" ))) |
| 745 | (";vo" "volatile" ) | ||
| 746 | (";w" "write" ) | ||
| 747 | (";wh" "where" )))) | ||
| 748 | 745 | ||
| 749 | 746 | ||
| 750 | ;;;###autoload | 747 | ;;;###autoload |