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


with latex-mode, there way obtain more 3 (3) levels of highlighting?

i control more 3 levels of highlighting, however, appears though latex-mode may limited 3 (3) levels. because emacs complains when attempting fourth level -- error during redisplay: (jit-lock-function 1) signaled (wrong-type-argument listp prepend). following example of attempt control 4 (4) levels, gave error message listed above.

(defvar lawlist-face-a (make-face 'lawlist-face-a)) (set-face-attribute 'lawlist-face-a nil :foreground "orange")  (defvar lawlist-face-b (make-face 'lawlist-face-b)) (set-face-attribute 'lawlist-face-b nil :foreground "cyan")  (defvar lawlist-face-c (make-face 'lawlist-face-c)) (set-face-attribute 'lawlist-face-c nil :foreground "blue")  (defvar lawlist-face-d (make-face 'lawlist-face-d)) (set-face-attribute 'lawlist-face-d nil :foreground "red")   (font-lock-add-keywords 'latex-mode '(  ("\\(\\\\begin\\|\\\\end\\)\\(\{\\)\\(document\\)\\(\}\\)" (1 lawlist-face-a) (2 lawlist-face-b) (3 lawlist-face-c) (4 lawlist-face-d) prepend)  )) 

i tried adding (setq font-lock-support-mode 'lazy-lock-mode), caused freeze. tried adding (setq font-lock-maximum-decoration t), didn't seem have appreciable effect.

the prepend atom needs outside quoted list, last argument font-lock-add-keywords:

(font-lock-add-keywords  'latex-mode  '(("\\(\\\\begin\\|\\\\end\\)\\(\{\\)\\(document\\)\\(\}\\)" (1 lawlist-face-a) (2 lawlist-face-b) (3 lawlist-face-c) (4 lawlist-face-d)))  'prepend) 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -