From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: On syntax decoration of identifiers containing underscore and statements word [f90] Date: Thu, 16 May 2013 20:37:22 -0400 Message-ID: References: <51955A32.2080302@alice.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1368751057 11657 80.91.229.3 (17 May 2013 00:37:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 May 2013 00:37:37 +0000 (UTC) Cc: emacs To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 02:37:34 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ud8fn-0002RZ-Hj for ged-emacs-devel@m.gmane.org; Fri, 17 May 2013 02:37:27 +0200 Original-Received: from localhost ([::1]:54297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud8fn-0007PP-4F for ged-emacs-devel@m.gmane.org; Thu, 16 May 2013 20:37:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud8fk-0007PI-Jn for emacs-devel@gnu.org; Thu, 16 May 2013 20:37:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ud8fj-0007aR-M9 for emacs-devel@gnu.org; Thu, 16 May 2013 20:37:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:29278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud8fj-0007aK-Hn for emacs-devel@gnu.org; Thu, 16 May 2013 20:37:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rwb8/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFG4rwb8/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="13147773" Original-Received: from 184-175-6-252.dsl.teksavvy.com (HELO pastel.home) ([184.175.6.252]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 May 2013 20:37:18 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 906AF6751E; Thu, 16 May 2013 20:37:22 -0400 (EDT) In-Reply-To: <51955A32.2080302@alice.it> (Angelo Graziosi's message of "Fri, 17 May 2013 00:14:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159634 Archived-At: > 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.