[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35124: 26.1; ada-mode 6.1.0 no longer syntax-highlights package name
From: |
Stephen Leake |
Subject: |
bug#35124: 26.1; ada-mode 6.1.0 no longer syntax-highlights package names at end of spec |
Date: |
Fri, 24 May 2019 08:49:55 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
> If you load a file consisting of these three lines:
>
> package Foo is
> procedure P;
> end Foo;
>
> then the second "Foo" is not syntax-highlighted.
I can't reproduce this with this small file; font-lock requests that the
entire buffer be parsed, so it is done correctly. With a larger file, so
the start of the package is farther away than the default font-lock
chunk size, the final package name is not highlighted.
This is because the 'end Foo;' is extra text at the end of the partial
parse, and the error recovery inserts 'begin', leaving a labeled block,
in which the label is not highlighted.
If the name has a '.', then it can't be a block label, and it might be
possible to convince the error recovery to insert "package <identifier>
is begin" instead; I'll work on that.
--
-- Stephe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#35124: 26.1; ada-mode 6.1.0 no longer syntax-highlights package names at end of spec,
Stephen Leake <=