unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 14442@debbugs.gnu.org, Stefan Monnier <monnier@IRO.UMontreal.CA>,
	Angelo Graziosi <angelo.graziosi@alice.it>
Subject: bug#14442: On syntax decoration of identifiers containing underscore and statements word [f90]
Date: Sat, 04 Dec 2021 05:07:44 +0100	[thread overview]
Message-ID: <87bl1xqagf.fsf@gnus.org> (raw)
In-Reply-To: <nlk3mp42a9.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 23 May 2013 21:03:42 -0400")

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





      parent reply	other threads:[~2021-12-04  4:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51955A32.2080302@alice.it>
     [not found] ` <jwvd2sqbfx9.fsf-monnier+emacs@gnu.org>
     [not found]   ` <51960C1D.6070906@alice.it>
2013-05-22 22:20     ` bug#14442: On syntax decoration of identifiers containing underscore and statements word [f90] Stefan Monnier
2013-05-22 23:48       ` Angelo Graziosi
2013-05-25 11:15         ` Angelo Graziosi
2013-05-24  1:03       ` Glenn Morris
2013-05-24  3:51         ` Stefan Monnier
2021-12-04  4:07         ` Lars Ingebrigtsen [this message]

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=87bl1xqagf.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=14442@debbugs.gnu.org \
    --cc=angelo.graziosi@alice.it \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=rgm@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).