diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-02-03 00:01:21 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-02-03 00:50:18 -0500 |
commit | d0f06a37e44a9bd495246f680ce525ed7a8a3084 (patch) | |
tree | b8d1ab571cb3f146670388328d782cc34402602b /bog.el | |
parent | 68e1df6a74e6791bef21b6c295ddc056cfe4d3e5 (diff) | |
download | bog-d0f06a37e44a9bd495246f680ce525ed7a8a3084.tar.gz |
Highlight in-text citekeysv0.5.0
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 |