Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor regular expressions used for font-locking #150

Open
exot opened this issue Oct 16, 2021 · 2 comments
Open

Refactor regular expressions used for font-locking #150

exot opened this issue Oct 16, 2021 · 2 comments

Comments

@exot
Copy link

exot commented Oct 16, 2021

Hey @skuro,

while trying to fix some issues with the regular expressions use for font-locking (i.e, #147) and looking into pull requests from others that have changed them (i.e., #144), I had the feeling that these regular expressions could be improved by some refactoring, because they seem to share a lot of common structure which is explicitly duplicated. After discussing this with @mtoboid in #144 I think the following two changes would be helpful:

  • Refactor common patterns in the regular expressions like "space-at-beginning-of-line" or "whitespace-stuff-at-end-of-line" into separate variables and using those consistently in all other regular expressions;
  • Adding a small function to reevaluate all regular expressions, i.e., reset all regular expressions to their original values (this might be useful during debugging, at least I had quite a hard time trying to fix a regular expression and then manually reevaluating all the necessary defvars afterwards)

What do you think about this? Is this a worthwhile endeavor from your point of view? If so, I could give it a try.

Best,

  Daniel

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 16, 2022
@exot
Copy link
Author

exot commented Apr 16, 2022

Bump to make stale-bot happy.

@stale stale bot removed the wontfix label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant