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

Fix #314, activating php-mode moves point to last apostrophe #315

Closed
wants to merge 2 commits into from

Conversation

aaronbieber
Copy link

This behavior was regressed by #307 because re-search-forward moves point. I added a save-excursion around that piece of code and a brief test.

The test PHP file should probably contain more varied code to catch future regressions that might happen based on other characters, but for now I targeted this specific issue.

This is my first php-mode merge request so let me know if I can make it more friendly in any way.

@mallt
Copy link
Contributor

mallt commented Aug 12, 2016

Just a quick note, wouldn't it be better to only wrap the emacs 25 specific call of php-syntax-propertize-function with a save-excursion (https://github.com/ejmr/php-mode/blob/master/php-mode.el#L1080-L1082), since previous emacs versions are not affected by this bug?

@syohex
Copy link
Collaborator

syohex commented Aug 13, 2016

This PR may cause infinite loop. It is only php-mode function issue and propertize function should not be modified. I have sent PR #316.

@syohex syohex closed this Aug 13, 2016
@syohex
Copy link
Collaborator

syohex commented Aug 13, 2016

I have merged #316. Please check latest version.
Thanks for PR, I added your test to project.

@aaronbieber
Copy link
Author

Great feedback, thanks for fixing up the solution! This bug was really annoying me 👍

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

Successfully merging this pull request may close these issues.

3 participants