bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14442: On syntax decoration of identifiers containing underscore and


From: Stefan Monnier
Subject: bug#14442: On syntax decoration of identifiers containing underscore and statements word [f90]
Date: Wed, 22 May 2013 18:20:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> ..but I have to flag another little issue..

Please report these as bug (i.e. via report-emacs-bug or to
address@hidden).

> In the code

>   public ExitProcess
>   interface
>      subroutine ExitProcess(uExitCode) bind(C,name='ExitProcess')
>        import
>        !GCC$ ATTRIBUTES STDCALL :: ExitProcess
>        integer(UINT_T), intent(in), value :: uExitCode
>      end subroutine ExitProcess
>   end interface

> the identifier "ExitProcess" after "public" (first line) has: "Exit" in
> magenta and "Process" in cyan. Shouldn't it be all in black?("ExitProcess"
> after "subroutine" is all in blue as expected)

At least this problem was not introduced by my recent change.  It was
already present in Emacs-24.2 (among other versions).

The patch below seems to fix it, but I don't know enough the rules of
Fortran syntax to be sure it's the right thing to do.  There are
probably other cases, by the way (the patch below also fixes one other
case for "implicitreal").


        Stefan


=== modified file 'lisp/progmodes/f90.el'
--- lisp/progmodes/f90.el       2013-05-17 00:36:33 +0000
+++ lisp/progmodes/f90.el       2013-05-22 22:16:01 +0000
@@ -641,16 +641,16 @@
 forall\\|block\\|critical\\)\\)\\_>"
       (2 font-lock-constant-face nil t) (3 font-lock-keyword-face))
     ;; Implicit declaration.
-    '("\\_<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
+    '("\\_<\\(implicit\\)[ \t]+\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
 \\|enumerator\\|procedure\\|\
 logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ 
\t]*"
       (1 font-lock-keyword-face) (2 font-lock-type-face))
-    '("\\_<\\(namelist\\|common\\)[ \t]*\/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/"
+    '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/"
       (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
     "\\_<else\\([ \t]*if\\|where\\)?\\_>"
     '("\\(&\\)[ \t]*\\(!\\|$\\)"  (1 font-lock-keyword-face))
     "\\_<\\(then\\|continue\\|format\\|include\\|stop\\|return\\)\\_>"
-    '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
+    '("\\_<\\(exit\\|cycle\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
       (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
     '("\\_<\\(case\\)[ \t]*\\(default\\|(\\)" . 1)
     ;; F2003 "class default".






reply via email to

[Prev in Thread] Current Thread [Next in Thread]