mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(fortran-mode-syntax-table): Change `;' to punctuation now it's not
needed for abbrevs. (fortran-mode-abbrev-table): Remove defvar, make use of new define-abbrev-table :regexp feature.
This commit is contained in:
parent
64f00939e0
commit
17cb3e0e8a
1 changed files with 66 additions and 75 deletions
|
|
@ -560,9 +560,9 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
|
|||
|
||||
(defvar fortran-mode-syntax-table
|
||||
(let ((table (make-syntax-table)))
|
||||
;; We might like `;' to be punctuation (g77 multi-statement
|
||||
;; lines), but that screws abbrevs.
|
||||
(modify-syntax-entry ?\; "w" table)
|
||||
;; Was a word-constituent (for abbrevs), now punctuation (g77
|
||||
;; multi-statement lines).
|
||||
(modify-syntax-entry ?\; "." table)
|
||||
(modify-syntax-entry ?\r " " table)
|
||||
(modify-syntax-entry ?+ "." table)
|
||||
(modify-syntax-entry ?- "." table)
|
||||
|
|
@ -670,78 +670,69 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
|
|||
"Keymap used in Fortran mode.")
|
||||
|
||||
|
||||
(defvar fortran-mode-abbrev-table
|
||||
(progn
|
||||
(define-abbrev-table 'fortran-mode-abbrev-table nil)
|
||||
fortran-mode-abbrev-table)
|
||||
"Abbrev table for Fortran mode.")
|
||||
|
||||
;; Not in defvar because user abbrevs may be restored before this file loads.
|
||||
(mapc
|
||||
(lambda (e)
|
||||
(condition-case nil
|
||||
(define-abbrev fortran-mode-abbrev-table (car e) (cdr e) nil :count 0
|
||||
:system t)
|
||||
(wrong-number-of-arguments ; Emacs 22
|
||||
(define-abbrev fortran-mode-abbrev-table (car e) (cdr e) nil 0 t))))
|
||||
'((";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" )))
|
||||
(define-abbrev-table 'fortran-mode-abbrev-table
|
||||
(mapcar (lambda (e) (list (car e) (cdr e) nil :system t))
|
||||
'((";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" )))
|
||||
"Abbrev table for Fortran mode."
|
||||
;; Accept ; as the first char of an abbrev. Also allow _ in abbrevs.
|
||||
:regexp "\\(?:[^[:word:]_;]\\|^\\)\\(;?[[:word:]_]+\\)[^[:word:]_]*")
|
||||
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue