Emacs: Simplify code for TODO, FIXME, etc. fontification

master
Pierre Neidhardt 2017-05-28 12:05:01 +02:00
parent 9ebd726a4a
commit 9de3d88eb8
1 changed files with 3 additions and 9 deletions

View File

@ -160,15 +160,9 @@
(font-lock-add-keywords
nil
;; See https://en.wikipedia.org/wiki/Comment_(computer_programming)#Tags.
'(("\\<\\(FIXME\\(([^)]+)\\)?\\):" 1 font-lock-warning-face prepend)
("\\<\\(HACK\\):" 1 font-lock-warning-face prepend)
("\\<\\(OPTIMIZE\\(([^)]+)\\)?\\):" 1 font-lock-warning-face prepend)
("\\<\\(REVIEW\\(([^)]+)\\)?\\):" 1 font-lock-warning-face prepend)
("\\<\\(TODO\\(([^)]+)\\)?\\):" 1 font-lock-warning-face prepend)
("\\<\\(UNDONE\\):" 1 font-lock-warning-face prepend)
("\\<\\(UX\\):" 1 font-lock-warning-face prepend)
("\\<\\(WARNING\\):" 1 font-lock-warning-face prepend)
("\\<\\(XXX\\):" 1 font-lock-warning-face prepend))))))
(mapcar
(lambda (keyword) `(,(concat "\\<\\(" keyword "\\):") 1 font-lock-warning-face prepend))
'("FIXME\\(([^)]+)\\)?" "HACK" "OPTIMIZE\\(([^)]+)\\)?" "REVIEW\\(([^)]+)\\)?" "TODO\\(([^)]+)\\)?" "UNDONE" "UX" "WARNING" "XXX"))))))
;; Man pages
(add-hook