0

I edited a perl script recently and since the edits, XEmacs refuses to do the cperl-mode syntax highlighting automatically.

I have been able to force the buffer to do the syntax highlighting in 2 different ways:

  • by selecting Options->Syntax Highlighting->Lazy Lock
  • by running M-x font-lock-fontify-buffer

For the life of me, I have not been able to figure out why these work-arounds are necessary. Other .pl files open with syntax highlighting just fine. The script runs, so it's valid code.

I tried updating. I tried adding things to the init.el file to run the font-lock-fontify-buffer command upon opening a file. After trying a bunch of things, I finally just blew away the init.el file away and it still opens other .pl files fine, but still chokes on this one file.

Whenever I open the file, the last status message printed is "Loading cperl-mode...done" (same as other .pl files without any errors).

Another thing that fails to happen is the window doesn't automatically resize to 80 columns.

question

Any idea why this is happening and how to get the syntax highlighting to work on ALL .pl files?

scott_lotus
  • 3,171
  • 22
  • 51
  • 69
hepcat72
  • 890
  • 4
  • 22
  • Is the file unusually large? – cjm Dec 07 '15 at 20:26
  • Yeah, actually, it's my largest script by a few thousand lines. I'm in the process of breaking it up. Might take awhile though. Is there a limit for xemacs? Current size: 10,407 lines. – hepcat72 Dec 07 '15 at 22:21

1 Answers1

1

I don't use XEmacs, but GNU Emacs has a font-lock-maximum-size variable. XEmacs probably has the same or a similar setting. You may need to increase that, or just set it to nil.

cjm
  • 61,471
  • 9
  • 126
  • 175