Comments (12)
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.
from php-mode.
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();
from php-mode.
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 php-mode-version-number
and php-mode-modified
? You can either use C-h v
or just look at the top of the php-mode.el
file you are using.
from php-mode.
Here is that info -- sorry I didn't include it before.
(defconst php-mode-version-number "1.9"
"PHP Mode version number.")
(defconst php-mode-modified "2012-12-20"
"PHP Mode build date.")
from php-mode.
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.
from php-mode.
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.
from php-mode.
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.
from php-mode.
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 .emacs
file somewhere? I am wondering if it is a conflict/issue caused by another library.
from php-mode.
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.
from php-mode.
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.
from php-mode.
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.
from php-mode.
@NateEag that's a good catch. Interesting that they closed that bug, but I was/am using a current version of web-mode.
from php-mode.
Related Issues (20)
- Text inside Heredoc breaks indentation.
- Syntax highlighting for SQL strings HOT 2
- Please tag release (prerelease or beta is ok) for Emacs 28 compatibility HOT 1
- Error in ternary operator indentation HOT 1
- Unexpected syntax highlights after "new" in string HOT 1
- Automatic, overly-clever brace-matching is annoying and how to turn it off is non-obvious HOT 2
- Function faces HOT 1
- Commented out array elements break indentation HOT 2
- Drop Emacs 25 Support
- WordPress coding style removing spaces around function args HOT 1
- The last argument of the method is not highlighted
- PEAR method chaining wrong indentation HOT 5
- File mode specification error HOT 5
- Indentation issue with closure/anonymous functions
- Lineup Cascaded Calls doesn't work properly
- emacs master results in error HOT 2
- Drop Emacs 26 Support
- Newline Indentation aligning with equal sign HOT 3
- while keyword says 'At top level' HOT 2
- Remove `$` from face names for interoperability with treesit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-mode.