aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2006-12-05 05:24:48 +0000
committerGlenn Morris2006-12-05 05:24:48 +0000
commit9ab66fc7585f55442ded2d9c398cf30e2a0709ca (patch)
tree99bf494c7c0ea2ffd1c2b28f367efd2470d30254
parent0761b294e1c6815b5f54d71fec1296ea3baa7410 (diff)
downloademacs-9ab66fc7585f55442ded2d9c398cf30e2a0709ca.tar.gz
emacs-9ab66fc7585f55442ded2d9c398cf30e2a0709ca.zip
(fortran-mode-abbrev-table): Define abbrevs even if abbrev-table is
non-nil (saved user abbrevs may have been restored).
-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'.")
604 604
605 605
606(defvar fortran-mode-abbrev-table 606(defvar fortran-mode-abbrev-table
607 (let (abbrevs-changed) 607 (progn
608 (define-abbrev-table 'fortran-mode-abbrev-table nil) 608 (define-abbrev-table 'fortran-mode-abbrev-table nil)
609 ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible. 609 fortran-mode-abbrev-table)
610 ;; Only use `apply' to quieten the byte-compiler. 610 "Abbrev table for Fortran mode.")
611 (mapcar 611
612 (function (lambda (element) 612(let (abbrevs-changed)
613 (condition-case nil 613 ;; Use the 6th arg (SYSTEM-FLAG) of define-abbrev if possible.
614 (apply 'define-abbrev fortran-mode-abbrev-table 614 ;; Only use `apply' to quieten the byte-compiler.
615 (append element '(nil 0 t))) 615 (mapcar
616 (wrong-number-of-arguments 616 (function (lambda (element)
617 (apply 'define-abbrev fortran-mode-abbrev-table 617 (condition-case nil
618 (append element '(nil 0))))))) 618 (apply 'define-abbrev fortran-mode-abbrev-table
619 '((";au" "automatic" ) 619 (append element '(nil 0 t)))
620 (";b" "byte" ) 620 (wrong-number-of-arguments
621 (";bd" "block data" ) 621 (apply 'define-abbrev fortran-mode-abbrev-table
622 (";ch" "character" ) 622 (append element '(nil 0)))))))
623 (";cl" "close" ) 623 '((";au" "automatic" )
624 (";c" "continue" ) 624 (";b" "byte" )
625 (";cm" "common" ) 625 (";bd" "block data" )
626 (";cx" "complex" ) 626 (";ch" "character" )
627 (";df" "define" ) 627 (";cl" "close" )
628 (";di" "dimension" ) 628 (";c" "continue" )
629 (";do" "double" ) 629 (";cm" "common" )
630 (";dc" "double complex" ) 630 (";cx" "complex" )
631 (";dp" "double precision" ) 631 (";df" "define" )
632 (";dw" "do while" ) 632 (";di" "dimension" )
633 (";e" "else" ) 633 (";do" "double" )
634 (";ed" "enddo" ) 634 (";dc" "double complex" )
635 (";el" "elseif" ) 635 (";dp" "double precision" )
636 (";en" "endif" ) 636 (";dw" "do while" )
637 (";eq" "equivalence" ) 637 (";e" "else" )
638 (";ew" "endwhere" ) 638 (";ed" "enddo" )
639 (";ex" "external" ) 639 (";el" "elseif" )
640 (";ey" "entry" ) 640 (";en" "endif" )
641 (";f" "format" ) 641 (";eq" "equivalence" )
642 (";fa" ".false." ) 642 (";ew" "endwhere" )
643 (";fu" "function" ) 643 (";ex" "external" )
644 (";g" "goto" ) 644 (";ey" "entry" )
645 (";im" "implicit" ) 645 (";f" "format" )
646 (";ib" "implicit byte" ) 646 (";fa" ".false." )
647 (";ic" "implicit complex" ) 647 (";fu" "function" )
648 (";ich" "implicit character") 648 (";g" "goto" )
649 (";ii" "implicit integer" ) 649 (";im" "implicit" )
650 (";il" "implicit logical" ) 650 (";ib" "implicit byte" )
651 (";ir" "implicit real" ) 651 (";ic" "implicit complex" )
652 (";inc" "include" ) 652 (";ich" "implicit character")
653 (";in" "integer" ) 653 (";ii" "implicit integer" )
654 (";intr" "intrinsic" ) 654 (";il" "implicit logical" )
655 (";l" "logical" ) 655 (";ir" "implicit real" )
656 (";n" "namelist" ) 656 (";inc" "include" )
657 (";o" "open" ) ; was ;op 657 (";in" "integer" )
658 (";pa" "parameter" ) 658 (";intr" "intrinsic" )
659 (";pr" "program" ) 659 (";l" "logical" )
660 (";ps" "pause" ) 660 (";n" "namelist" )
661 (";p" "print" ) 661 (";o" "open" ) ; was ;op
662 (";rc" "record" ) 662 (";pa" "parameter" )
663 (";re" "real" ) 663 (";pr" "program" )
664 (";r" "read" ) 664 (";ps" "pause" )
665 (";rt" "return" ) 665 (";p" "print" )
666 (";rw" "rewind" ) 666 (";rc" "record" )
667 (";s" "stop" ) 667 (";re" "real" )
668 (";sa" "save" ) 668 (";r" "read" )
669 (";st" "structure" ) 669 (";rt" "return" )
670 (";sc" "static" ) 670 (";rw" "rewind" )
671 (";su" "subroutine" ) 671 (";s" "stop" )
672 (";tr" ".true." ) 672 (";sa" "save" )
673 (";ty" "type" ) 673 (";st" "structure" )
674 (";vo" "volatile" ) 674 (";sc" "static" )
675 (";w" "write" ) 675 (";su" "subroutine" )
676 (";wh" "where" ))) 676 (";tr" ".true." )
677 fortran-mode-abbrev-table)) 677 (";ty" "type" )
678 (";vo" "volatile" )
679 (";w" "write" )
680 (";wh" "where" ))))
678 681
679 682
680
681;;;###autoload 683;;;###autoload
682(defun fortran-mode () 684(defun fortran-mode ()
683 "Major mode for editing Fortran code in fixed format. 685 "Major mode for editing Fortran code in fixed format.