I'm using Prelude v 1.0.0. I want to turn off the syntax coloring when my lines exceed a certain word-limit. I don't know where that setting is set. Thanks!

EDIT: I should be more precise. Prelude, by default, sets the color of the text from it's "normal" color to a brighter, more annoying color when it exceeds a certain word-limit. I'm trying to figure out where to tweak it in prelude. I'll give the below suggestion a whirl though.

  • Here's some discussion on how to improve font-lock performance: emacswiki.org/emacs/FontLockSpeed but it doesn't deal with what you want exactly (i.e. it doesn't tell how and whether at all it is possible to not fontify large files). – wvxvw Mar 12 '15 at 8:46
  • Do you mean that Prelude highlights long lines automatically and you want to stop that from happening? – Kaushal Modi Mar 12 '15 at 11:26
  • 1
    Does this behavior depend at all on prelude? It doesn't sound like it, but I don't know much about prelude. – Dan Mar 12 '15 at 14:06
  • 1
    My guess is that prelude has whitespace-mode turned on by default to highlight long lines. – Jordon Biondo Mar 12 '15 at 18:05
  • 1
    @Jordon Biodono is absolutely correct and there are already a few threads on this issue, some of which describe how to turn off whitespace-mode and others about how to customize whitespace-style. One of the other threads even cites the Prelude documentation that discusses this. I'll list a few of the threads I am aware of that deal with this issue: stackoverflow.com/questions/28244739/… and github.com/bbatsov/prelude#disabling-whitespace-mode and wikemacs.org/wiki/Prelude#Turn_off_whitespace_mode – lawlist Mar 13 '15 at 5:07

@lawlist is correct: This question is a (not-so-obvious) duplicate of How to change word wrap highlighting in Emacs on StackOverflow. Since we can't close questions against posts on other StackExchange sites, I'm going to repeat the answer that I gave over there:

Highlighting of content that exceeds word wrap bounds is provided by whitespace-mode (which is actually a built-in mode).

The Prelude documentation explains how to disable it:

Disabling whitespace-mode

Although whitespace-mode is awesome some people might find it too intrusive. You can disable it in your personal config with the following bit of code:

(setq prelude-whitespace nil)

|improve this answer|||||

Something along the liens of following should work:

(font-lock-add-keywords nil '(("^.\\{70,\\}$" 0 default prepend)))

I'm not sure if it blocks other keywords from considering same line but I'm sure it's possbile. Then you'll need to substitute "." with a word regexp, if it's important and adjust the number 70 according to your sepcification.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.