diff options
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -345,6 +345,23 @@ The citekey is split by groups in `bog-citekey-format' and joined by (let ((query (bog-citekey-groups-with-delim citekey "+"))) (format bog-web-search-url query))) + +;;; Font-lock + +(defface bog-citekey-face + '((((class color) (background dark)) + (:bold t)) + (((class color) (background light)) + (:bold t))) + "Face used to highlight text that matches `bog-citekey-format'.") + +(defun bog-non-heading-citekey-p (limit) + (and (re-search-forward bog-citekey-format limit t) + (not (org-at-heading-p)))) + +(font-lock-add-keywords 'org-mode + '((bog-non-heading-citekey-p . 'bog-citekey-face))) + (provide 'bog) ;; bog.el ends here |