From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Angelo Graziosi <angelo.graziosi@alice.it>
Cc: emacs <emacs-devel@gnu.org>
Subject: Re: On syntax decoration of identifiers containing underscore and statements word [f90]
Date: Thu, 16 May 2013 20:37:22 -0400 [thread overview]
Message-ID: <jwvd2sqbfx9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <51955A32.2080302@alice.it> (Angelo Graziosi's message of "Fri, 17 May 2013 00:14:10 +0200")
> 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.
next prev parent reply other threads:[~2013-05-17 0:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 22:14 On syntax decoration of identifiers containing underscore and statements word [f90] Angelo Graziosi
2013-05-17 0:37 ` Stefan Monnier [this message]
2013-05-17 10:53 ` Angelo Graziosi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvd2sqbfx9.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=angelo.graziosi@alice.it \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).