comparison lisp/progmodes/fortran.el @ 92812:ce9eec736ca9

(fortran-mode-abbrev-table): Use newer form of define-abbrev, where supported. No need to bind abbrevs-changed for system abbrevs.
author Glenn Morris <rgm@gnu.org>
date Thu, 13 Mar 2008 03:26:47 +0000
parents 5d6075e76505
children 5f0e2d26daed
comparison
equal deleted inserted replaced
92811:2dc33caeb08c 92812:ce9eec736ca9
674 (progn 674 (progn
675 (define-abbrev-table 'fortran-mode-abbrev-table nil) 675 (define-abbrev-table 'fortran-mode-abbrev-table nil)
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
751 (defun fortran-mode () 748 (defun fortran-mode ()
752 "Major mode for editing Fortran code in fixed format. 749 "Major mode for editing Fortran code in fixed format.