From 4fa6da01eb7883976313de119cd3c268ca639778 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 19 Feb 2015 21:28:12 -0800 Subject: [PATCH] f90.el: Add some F2008 keywords * lisp/progmodes/f90.el (f90-keywords-re, f90-procedures-re) (f90-font-lock-keywords-2): Some F2008 additions. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/f90.el | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d15b4095bf..b04319891fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-02-20 Glenn Morris + + * progmodes/f90.el (f90-keywords-re, f90-procedures-re) + (f90-font-lock-keywords-2): Some F2008 additions. + 2015-02-19 Dima Kogan * autorevert.el (auto-revert-buffers-counter) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index aeb4ddee9ef..b923819ebb3 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -342,8 +342,10 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil." "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" ;; F2008. + ;; FIXME f90-change-keywords does not work right if + ;; there are spaces. "contiguous" "submodule" "concurrent" "codimension" - "sync all" "sync memory" "critical" "image_index" + "sync all" "sync memory" "critical" "image_index" "error stop" )) "\\_>") "Regexp used by the function `f90-change-keywords'.") @@ -417,6 +419,8 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil." "norm2" "parity" "findloc" "is_contiguous" "sync images" "lock" "unlock" "image_index" "lcobound" "ucobound" "num_images" "this_image" + "acosh" "asinh" "atanh" + "atomic_define" "atomic_ref" "execute_command_line" ;; F2008 iso_fortran_env module. "compiler_options" "compiler_version" ;; F2008 iso_c_binding module. @@ -649,7 +653,8 @@ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) "\\_" '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face)) - "\\_<\\(then\\|continue\\|format\\|include\\|stop\\|return\\)\\_>" + "\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\ +return\\)\\_>" '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) '("\\_<\\(case\\)[ \t]*\\(default\\|(\\)" . 1) @@ -2338,6 +2343,8 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (skip-chars-forward " \t0-9") (looking-at "#")))) (setq ref-point (point) + ;; FIXME this does not work for constructs with + ;; embedded space, eg "sync all". back-point (save-excursion (backward-word 1) (point)) saveword (buffer-substring back-point ref-point)) (funcall change-word -1) -- 2.11.4.GIT