[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17222: 24.3; In f90-mode variables declared in continuation lines ar
From: |
Lars Ingebrigtsen |
Subject: |
bug#17222: 24.3; In f90-mode variables declared in continuation lines are not colored. |
Date: |
Tue, 17 May 2022 19:32:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Mattias Engdegård <mattiase@acm.org> writes:
> part at the end is a potential empty-string repetition that indicates an
> ambiguity which we'd like to remove.
> What is the desired grammar here? Moving to rx for clarity, the above snippet
> means
>
> (+ (* (not (in "\n!&")))
> (? "&\n"))
>
> What about rewriting it as
>
> (: (* (not (in "\n!&")))
> (* "&\n"
> (* (not (in "\n!&")))))
>
> which should be equivalent but unambiguous?
Yes, I think that's correct.
> However there may be something more fundamentally wrong with the original
> change, because it only seems to work for me after loading a file, not when
> writing the code incrementally. More precisely, when I've typed
>
> program main
> integer :: alpha, &&
>
> in a new buffer then everything looks correctly coloured, but if I add
>
> beta
>
> to the next line then it isn't fontified at all. Saving and reloading the
> buffer helps. Can you confirm?
Yes. I had forgotten all about the rules for multiline font locking
(i.e., (elisp)Multiline Font Lock). So I think my changes here were
basically misguided, and this should be implemented in a totally
different way.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no