![]() ![]() The second REGEXP highlights all single spaces after a point. '(text-mode latex-mode html-mode emacs-lisp-mode "Used in text-mode and friends for exactly one space after a period.") Here, we don’t just call font-lock-add-keywords – we loop over a list of major modes and add the keywords to all the modes in the list. FACE) Highlight REGEXP with FACE (REGEXP N FACE) Highlight group N in REGEXP with FACE (REGEXP (N1 FACE1) (N2 FACE2) (N3 FACE3) …) Highlight group Ni in REGEXP with FACEi Add keywords to all major modes (font-lock-add-keywords 'html-mode html-mode-keywords)Įvery Element has one of the following forms: (REGEXP. Here’s an example for plain HtmlMode: ( defvar html-mode-keywords It adds two fontification patterns for C mode, to fontify `FIXME:’ words, even in comments, and to fontify ‘and’, ‘or’ and ‘not’ words as keywords. Here is a simple example from the documentation of font-lock-add-keywords: (font-lock-add-keywords 'c-mode It makes “foo” a keyword in EmacsLisp mode. Let us start with the simplest example: (font-lock-add-keywords 'emacs-lisp-mode ![]() Here’s the normal way of adding new keywords to a mode. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |