-
Notifications
You must be signed in to change notification settings - Fork 117
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
Keywords found in block comments are highlighted according to keyword coloring, not comment coloring #47
Comments
Sorry but I am unable to reproduce this. What version of Emacs and php-mode are you using? Also is there anything else around the comment, or does it just happen with the comment in isolation? I ask because I just want to make sure no error with highlighting code is spilling over into comments through error. |
GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-09 on murphy, modified by Debian Here's the code. In the comment "and" and "for" are treated as keywords. <?php
/*
Plugin Name: Locator
Depends: Pods - Custom Content Types and Fields
Plugin URI: http://www.foobar.com/
Description: Provides an interactive locator page for finding retailers that sell foobar products.
Version: 1.0
Author: Fooman
Author URI: http://fooman.net
License: Proprietary
*/
define( 'LOCATOR_PATH', plugin_dir_path(__FILE__) );
define( 'LOCATOR_VERSION', "1.0" );
define( 'LOCATOR_SHORTCODE', 'locator' );
if (is_admin()) {
require LOCATOR_PATH . "class-locator-admin.php";
$locator = new Locator_Admin();
register_activation_hook( __FILE__, array( $locator, 'activate' ));
} else {
require LOCATOR_PATH . "class-locator-front.php";
$locator = new Locator_Front();
}
$locator->init();
|
Thank you for the information and the test case. We are using different versions of Emacs, so I will try to duplicate the problem using yours. Could you also please tell me the values you have for |
Here is that info -- sorry I didn't include it before.
|
No problem, thanks for the info and bug report. It reminds me actually---I should add a command that automatically prints out all of the data that may be useful for debugging php-mode, like the things above. |
Ok, just saw the issue happen in my stock version of php-mode as well, so it is not specific to your version. Restarted emacs, and loaded your version, and did not see the problem. So, something is happening during the course of using the plugin that is causing the syntax highlighting to stop working correctly. I'm not sure what it is. I will follow up if I get a better idea of a cause. |
Another note -- when this happens, it also affects highlighting in other modes. For example, I'll load my .emacs and comments are not correctly colored. |
Thank you for the updates @mitc0185 So it sounds like the problem is not with php-mode. But whatever it is, it can affect php-mode so I am still curious to figure out the cause. Is it possible for you to post your |
Here is my .emacs: http://pastebin.com/XEvvgwcD I've upgraded Emacs to the latest version from GNU, GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-12-29 on hemingway I haven't seen the issue re-occur with the new version. |
Thanks for posting. I don't see anything obvious there which would cause that problem. Since it sounds like the issue was outside of the scope of php-mode I am going to close this bug report, but please let me know if the same problem happens again now that you have upgraded Emacs itself. |
For anyone who's interested, I believe the issue here is probably due to web-mode: I know I've seen this issue happen while using web-mode, and I see that mitc0185 uses it as well. |
@NateEag that's a good catch. Interesting that they closed that bug, but I was/am using a current version of web-mode. |
In a block comment, such as:
/* foo and bar */
The "and" is colored as if it's a keyword, when in that context it should be colored as a comment.
The text was updated successfully, but these errors were encountered: