Skip to content

Move LSL keyword default to lsl_definitions.yaml - #123

Merged
HaroldCindy merged 2 commits into
secondlife:mainfrom
tapple:lsl-default
May 11, 2026
Merged

Move LSL keyword default to lsl_definitions.yaml#123
HaroldCindy merged 2 commits into
secondlife:mainfrom
tapple:lsl-default

Conversation

@tapple

@tapple tapple commented May 9, 2026

Copy link
Copy Markdown
Contributor

default was misplaced in the keywords file as a constant, rather than a control, and the generators had some special handling for it. Move it to the logical place, and remove the exceptions

This also removes exceptional handling for it in the unmerged textmate generator: #120 (review)

This changes it's in-viewer highlighting color from blue to purple

@tapple tapple changed the title Move "default" from constants to controls Move default from constants to controls May 9, 2026
@tapple tapple changed the title Move default from constants to controls Move LSL keyword default from constants to controls May 9, 2026
@HaroldCindy

Copy link
Copy Markdown
Collaborator

It's really only under there so the color of default is distinct from state foo. Is having it in constants breaking anything?

@tapple

tapple commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

it's not breaking anything, in that:

  1. it's been this way since time immemorial
  2. it's only one item in the wrong place and thus is easy to single out an exception for.

Why somebody wanted it to have a different color than state foo, I have no idea (I would prefer they matched), but, that's the only theory present in the code.

The motivation for this PR is indeed weak: removing a one-line exception from the textmate generator, and 7 lines of exception elsewhere

While I don't have a strong opinion about the highlighting color (bikeshed topic), it would be nice to move default's description source from lsl.py to lsl_definitions.yaml (this would also get rid of the textmate exception). I could still put it in with the constants in the keywords.xml generator, to preserve the color

@WolfGangS

Copy link
Copy Markdown
Contributor

Personally i agree it should be in flow control.

But i do think it needs a special case to be kept in constants for now for keywords.xml changing that after so many years is probably not advisable.

I'm pretty certain that loads of less familiar scripters would think its an error or just miss it being blue 😢

@tapple

tapple commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

moved it back to constants in keywords.xml: a959614. Now this PR no longer changes keywords.xml

@tapple tapple changed the title Move LSL keyword default from constants to controls Move LSL keyword default to the lsl_definitions.yaml May 10, 2026
@tapple tapple changed the title Move LSL keyword default to the lsl_definitions.yaml Move LSL keyword default to lsl_definitions.yaml May 10, 2026
@HaroldCindy
HaroldCindy merged commit 7f12955 into secondlife:main May 11, 2026
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants