Bug 476879

Summary: Syntax highlighting fails to recognize Scheme function definition
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: ceving
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: normal CC: christoph, walter.von.entferndt
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot showing wrong highlighting

Description ceving 2023-11-12 12:38:21 UTC
Created attachment 163075 [details]
screenshot showing wrong highlighting

SUMMARY
Scheme provides two ways to define functions. This works as expected:

    (define function-name (lambda () #t))

But this does not work:

    (define (function-name) #f)

STEPS TO REPRODUCE
1. Open a file with the above code
2. Save it with the extension ".scm"
3. Check if the identifier "function-name" gets recognized as an identifier.

OBSERVED RESULT
In the first expression the function name gets rendered purple.
But in the second expression the function name is just black.

EXPECTED RESULT
Both occurrences of "function-name" must be rendered the same.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Debian GNU/Linux 12 (bookworm) 12 (x86_64)
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 ceving 2023-11-25 11:10:27 UTC
This affects also other projects, which use the Kate syntax definitions.

https://github.com/jgm/skylighting/issues/177