• Login
Community
  • Login

User-defined language is ignored since 8.4.6

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 710 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    Martin Guttmann
    last edited by Nov 3, 2022, 10:26 PM

    Dear all,

    before I updated Notepad++ to v8.4.6 my user-defined language with extension “php” was used for all *.php files instead of the default php style.
    Now, with v8.4.6, Notepad++ uses always the default styling for *.php and ignores my user language definition.
    How can I change this behavior back?

    I already tried to delete the extensions for php from the langs.xml in the AppData folder. It doesn’t helped.

    Best regards,
    Martin

    P 1 Reply Last reply Nov 3, 2022, 11:44 PM Reply Quote 0
    • P
      PeterJones @Martin Guttmann
      last edited by Nov 3, 2022, 11:44 PM

      @Martin-Guttmann ,

      It’s using shebang/prolog/first-line detection (seeing the <?php... line), which is incorrectly overriding your extension definition.

      That should be fixed in v8.4.7, which is in Release Candidate now (item 14 from that list). If you’d like to try it to confirm the new version works for you, that’s great. If it doesn’t, report in that thread with your Debug Info, and an exact set of the steps so that they can reproduce your problem.

      P 1 Reply Last reply Nov 4, 2022, 8:53 PM Reply Quote 2
      • P
        PeterJones @PeterJones
        last edited by Nov 4, 2022, 8:53 PM

        @PeterJones said in User-defined language is ignored since 8.4.6:

        If you’d like to try it to confirm the new version works for you

        I didn’t hear back from @Martin-Guttmann , and today I was able to find time: I created a UDL “MyPHP” in v8.4.7-RC that was associated with .php files, and verified that when I opened a .php, it used that, not the builtin PHP lexer, even when it started with <?php . So now file extension identification is properly taking priority over first-line detection.

        L 1 Reply Last reply Nov 5, 2022, 10:04 PM Reply Quote 3
        • M
          Martin Guttmann
          last edited by Nov 5, 2022, 6:57 AM

          Thanks Peter,

          v8.4.7 works for me.

          1 Reply Last reply Reply Quote 1
          • L
            Lycan Thrope @PeterJones
            last edited by Lycan Thrope Nov 5, 2022, 10:05 PM Nov 5, 2022, 10:04 PM

            @PeterJones ,

            I need to upgrade my version also, but I’ve just recently noted that using NPP to open a file one has right-clicked on and selected NPP to use, that it pulls up the new file, which it’s supposed to, but have noticed also, that when I switch to the previous document that came up with the right-clicked file, that my dBASEPlus UDL’s autoCompletion was not working on that file…until NPP is closed and then opened itself…and then the file would work with the autoCompletion again. Was going to write about it, but I’ll upgrade first and see it’s fixed according to your post. Thanks.

            1 Reply Last reply Reply Quote 0
            3 out of 5
            • First post
              3/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors