php-mode icon indicating copy to clipboard operation
php-mode copied to clipboard

emacs25 - indentation & syntax highlighting broken

Open eoghanmurray opened this issue 8 years ago • 3 comments

Upon upgrade to emacs25 and installing latest version of php-mode 1.18.3 I've noticed the mode produces incorrect syntax highlighting (and hence incorrectly indents etc.) after code editing of a large file. After I make some edit that messes up syntax highlighting, I have to manually call php-mode to fix syntax highlighting (this takes a number of seconds to execute) only to have the mode break again moments later after my next edit. I've done a git bisect and have traced this breakage back to https://github.com/ejmr/php-mode/commit/86eab8013c566eebcb77dadf5616b3e99e0eeb1d I've disabled that call to php-syntax-propertize-function in my local version of php-mode and will report back if that has fixed it for good.

I've got one largish file that reliably triggers the breakage upon editing, it's very hard to pin down exactly what combination of code is causing the breakage, but let me know if you can't recreate and I'll try to cobble together some sort of a minimal test case.

eoghanmurray avatar Sep 06 '17 12:09 eoghanmurray

Thank you for the bug report and the git-bisect information. Is it possible for you to post that file which triggers the error? It would be useful for correcting and testing both this issue and #370, since I will not be surprised if the bugs are related in some way.

If you cannot or do not want to post that file publically then you can, if you wish, e-mail it to me privately at [email protected]. And if you cannot share it privately---e.g. legal reasons if it is source code from a professional product---then that is ok too, as I understand that's not always possible to do. Regardless, thank you again for the information and help you've already provided.

ejmr avatar Sep 06 '17 22:09 ejmr

I apologize for the delay but unexpected things have kept me from doing much. Regarding that file you sent me: I will not give it to anyone else, including anyone who takes over PHP Mode. You have my word that no one besides me will ever see it.

ejmr avatar Sep 26 '17 18:09 ejmr

Is this still a problem with current php-mode master?

ghost avatar Feb 07 '18 20:02 ghost