diff options
author | Case Duckworth | 2022-01-25 16:54:47 -0600 |
---|---|---|
committer | Case Duckworth | 2022-01-25 16:54:47 -0600 |
commit | 3c30daf8a5c3424ad05d9637c30567d56004269d (patch) | |
tree | 32dfd034e923954667a228019435e2d328304ab8 /lisp | |
parent | Here we go again (diff) | |
download | emacs-3c30daf8a5c3424ad05d9637c30567d56004269d.tar.gz emacs-3c30daf8a5c3424ad05d9637c30567d56004269d.zip |
Add function `font-lock-todo-insinuate'
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 4e5afb5..d805a10 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -222,5 +222,24 @@ UNIT can be one of :kb, :mb, :gb, :tb, :pb, :eb, :zb, :yb; :kib, :mib, :gib, | |||
222 | (:zib (* 1024 1024 1024 1024 1024 1024 1024)) | 222 | (:zib (* 1024 1024 1024 1024 1024 1024 1024)) |
223 | (:yib (* 1024 1024 1024 1024 1024 1024 1024 1024))))) | 223 | (:yib (* 1024 1024 1024 1024 1024 1024 1024 1024))))) |
224 | 224 | ||
225 | ;;; Font lock TODO keywords | ||
226 | |||
227 | (defcustom font-lock-todo-keywords '("TODO" "XXX" "FIXME" "BUG") | ||
228 | "Keywords to highlight with `font-lock-todo-face'.") | ||
229 | |||
230 | (defface font-lock-todo-face '((t :inherit font-lock-warning-face)) | ||
231 | "Face for TODO keywords.") | ||
232 | |||
233 | (defun font-lock-todo-insinuate () | ||
234 | (let ((keyword-regexp | ||
235 | (rx bow (group (eval (let ((lst '(or))) | ||
236 | (dolist (kw font-lock-todo-keywords) | ||
237 | (push kw lst)) | ||
238 | (nreverse lst)))) | ||
239 | ":"))) | ||
240 | (font-lock-add-keywords | ||
241 | nil | ||
242 | `((,keyword-regexp 1 'font-lock-todo-face prepend))))) | ||
243 | |||
225 | (provide 'acdw) | 244 | (provide 'acdw) |
226 | ;;; acdw.el ends here | 245 | ;;; acdw.el ends here |