GNU bug report logs - #35124
26.1; ada-mode 6.1.0 no longer syntax-highlights package names at end of spec

Previous Next

Packages: emacs, ada-mode;

Reported by: Ludovic Brenta <ludovic <at> ludovic-brenta.org>

Date: Wed, 3 Apr 2019 16:06:02 UTC

Severity: minor

Found in version 26.1

Done: Stephen Leake <stephen_leake <at> stephe-leake.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: Ludovic Brenta <ludovic <at> ludovic-brenta.org>
Cc: 35124 <at> debbugs.gnu.org, ada-mode-users <at> nongnu.org
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
Ludovic Brenta <ludovic <at> 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




This bug report was last modified 5 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.