Questions tagged [font-lock]

Font-lock is a minor mode of GNU Emacs. It assigns faces locally to a particular buffer.

Font Lock mode is a minor mode of GNU Emacs. Font Lock mode is:

always local to a particular buffer, which assigns faces to (or fontifies) the text in the buffer. Each buffer's major mode tells Font Lock mode which text to fontify; for instance, programming language modes fontify syntactically relevant constructs like comments, strings, and function names.

Font Lock mode is enabled by default. To toggle it in the current buffer, type M-x font-lock-mode. A positive numeric argument unconditionally enables Font Lock mode, and a negative or zero argument disables it.

[section 14.12 Gnu Emacs Manual]

111 questions
0
votes
1 answer

strange issue for python syntax highlight in emacs

I configured my Emacs 24.3 under Windows for python using the python.el that comes with Emacs 24.3, following is my snippet for python IDE configuration in init.el ;;; python IDE ;;; setup jedi and autocomplete for python (require 'jedi) (add-hook…
shelper
  • 10,053
  • 8
  • 41
  • 67
0
votes
1 answer

latex-mode / font-lock: any way to obtain more than three (3) levels of highlighting?

With latex-mode, is there any way to obtain more than three (3) levels of highlighting? I would like to control more than three levels of highlighting, however, it appears as though latex-mode may be limited to three (3) levels. I say this because…
lawlist
  • 13,099
  • 3
  • 49
  • 158
0
votes
1 answer

Emacs font-lock highlighting weirdness

I have code to change default color theme. I prefer this way because I add more classes then default font-lock. (defmacro /construct-face (name comment &rest args) "Define face and specify attributes." (list 'progn (list 'defface…
KAction
  • 1,977
  • 15
  • 31
0
votes
2 answers

Modifying Font-Locking Entries in Emacs

How do I make change to XXX-font-lock-keywords (typically using assoc plus setcdr) affect the fontification in XXX-mode? It doesn't suffice to simply change the variable to make the change have effect.
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
0
votes
1 answer

emacs customize-face color

I tried to customize my emacs color by changing font-lock faces' color (M-x customize-face). But I found that the amount of color is not as many as all the values #xxxxxx. For example, when changing a color value from #000000 to #FF0000, I just got…
-1
votes
1 answer

emacs, #ifdef macro color change, and indent

I want my emacs to change code color to gray if the macro undefined, and also, in the case of #ifdef #else, a proper indent is needed too. #define MY_MACRO #ifdef MY_MACRO int foo = 0;//proper indent, normal color #else int bar = 0;//proper indent,…
Francis
  • 737
  • 1
  • 7
  • 21
1 2 3 4 5 6 7
8