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: Lars Ingebrigtsen
Subject: bug#14442: On syntax decoration of identifiers containing underscore and statements word [f90]
Date: Sat, 04 Dec 2021 05:07:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Glenn Morris <rgm@gnu.org> writes:

>> -    '("\\_<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
>> +    '("\\_<\\(implicit\\)[ \t]+\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
>
> Probably correct, since I think the space is required in this case.

I've now done this change in Emacs 29.

>> -    '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
>> +    '("\\_<\\(exit\\|cycle\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
>
> Breaks highlighting of plain "exit" (the following label is optional).

And I've fixed this by making it into two cases.  My test case (included
below) now highlights both exits correctly, and doesn't highlight
"public ExitProcess".

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

do 100 i=1,1000
      xarray(i)=indata(i)*a
      k = k+1
      if (xarray(i).eq.0.or.k.eq.kmax) then 
         exit
      else if (i.gt.1)
         results(i)=xarray(i)+xarray(i-1)
         exit foo
      else
         results(i)=xarray(i)
      end if   
100 continue
    if (i.lt.1000) print *, 'Exited loop early'


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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