[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On syntax decoration of identifiers containing underscore and statem
From: |
Stefan Monnier |
Subject: |
Re: On syntax decoration of identifiers containing underscore and statements word [f90] |
Date: |
Thu, 16 May 2013 20:37:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> I noticed that in f90-mode, identifiers of variables like
[...]
> are all in black. Shouldn't they be all in black?
Indeed. I installed the patch below which should fix those problems.
Stefan
=== modified file 'lisp/progmodes/f90.el'
--- lisp/progmodes/f90.el 2013-05-15 00:52:07 +0000
+++ lisp/progmodes/f90.el 2013-05-17 00:34:20 +0000
@@ -319,6 +319,8 @@
;; User options end here.
(defconst f90-keywords-re
+ (concat
+ "\\_<"
(regexp-opt '("allocatable" "allocate" "assign" "assignment" "backspace"
"block" "call" "case" "character" "close" "common" "complex"
"contains" "continue" "cycle" "data" "deallocate"
@@ -342,10 +344,13 @@
;; F2008.
"contiguous" "submodule" "concurrent" "codimension"
"sync all" "sync memory" "critical" "image_index"
- ) 'words)
+ ))
+ "\\_>")
"Regexp used by the function `f90-change-keywords'.")
(defconst f90-keywords-level-3-re
+ (concat
+ "\\_<"
(regexp-opt
'("allocatable" "allocate" "assign" "assignment" "backspace"
"close" "deallocate" "dimension" "endfile" "entry" "equivalence"
@@ -363,7 +368,8 @@
;; "concurrent" is only in the sense of "do [,] concurrent", but given
;; the [,] it's simpler to just do every instance (cf "do while").
"contiguous" "concurrent" "codimension" "sync all" "sync memory"
- ) 'words)
+ ))
+ "\\_>")
"Keyword-regexp for font-lock level >= 3.")
(defconst f90-procedures-re
@@ -428,6 +434,8 @@
"Regexp matching intrinsic operators.")
(defconst f90-hpf-keywords-re
+ (concat
+ "\\_<"
(regexp-opt
;; Intrinsic procedures.
'("all_prefix" "all_scatter" "all_suffix" "any_prefix"
@@ -447,10 +455,13 @@
"align" "distribute" "dynamic" "independent" "inherit" "processors"
"realign" "redistribute" "template"
;; Keywords.
- "block" "cyclic" "extrinsic" "new" "onto" "pure" "with") 'words)
+ "block" "cyclic" "extrinsic" "new" "onto" "pure" "with"))
+ "\\_>")
"Regexp for all HPF keywords, procedures and directives.")
(defconst f90-constants-re
+ (concat
+ "\\_<"
(regexp-opt '( ;; F2003 iso_fortran_env constants.
"iso_fortran_env"
"input_unit" "output_unit" "error_unit"
@@ -482,7 +493,8 @@
"integer_kinds" "iostat_inquire_internal_unit"
"logical_kinds" "real_kinds" "real32" "real64" "real128"
"lock_type" "atomic_int_kind" "atomic_logical_kind"
- ) 'words)
+ ))
+ "\\_>")
"Regexp for Fortran intrinsic constants.")
;; cf f90-looking-at-type-like.