Code Monkey home page Code Monkey logo

Comments (12)

ejmr avatar ejmr commented on July 17, 2024

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.

mitc0185 avatar mitc0185 commented on July 17, 2024

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.

ejmr avatar ejmr commented on July 17, 2024

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.

mitc0185 avatar mitc0185 commented on July 17, 2024

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.

ejmr avatar ejmr commented on July 17, 2024

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.

mitc0185 avatar mitc0185 commented on July 17, 2024

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.

mitc0185 avatar mitc0185 commented on July 17, 2024

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.

ejmr avatar ejmr commented on July 17, 2024

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.

mitc0185 avatar mitc0185 commented on July 17, 2024

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.

ejmr avatar ejmr commented on July 17, 2024

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.

NateEag avatar NateEag commented on July 17, 2024

For anyone who's interested, I believe the issue here is probably due to web-mode:

fxbois/web-mode#13

I know I've seen this issue happen while using web-mode, and I see that mitc0185 uses it as well.

from php-mode.

mitc0185 avatar mitc0185 commented on July 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.