[sil-mode.el] Improve handling of box types by sil-mode-display-function-cfg #35173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specifically, I changed how sil-mode-display-function-cfg searches for the
start/end of the SIL function body where the current point is. Previously, we
just searched for the exact strings "{" and "}" backwards and forwards
respectively. That was insufficient in the context of box types that use those
characters.
Instead with this change, we convert the aforementioned static search to a regex
search. Our regex match "{$" for the beginning of the SIL function and "^} //
end sil function '" or "^}" which I think will generally work to get the correct
body. NOTE: We first check for the end sil function variant.