From 3dfba2deeaf9c0690527f9a351798af6bdb140ba Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Thu, 26 Feb 2015 08:38:21 -0500 Subject: [PATCH] make hi-lock-mode buffer local when colorizing links. --- org-ref.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org-ref.org b/org-ref.org index f0d94ec..f01473b 100644 --- a/org-ref.org +++ b/org-ref.org @@ -452,11 +452,15 @@ label:test `((t (:inherit org-link :foreground ,org-ref-ref-color))) "Face for ref links in org-ref.") -(global-hi-lock-mode 1) -(when org-ref-colorize-links +(defun org-ref-colorize-links () + "Colorize org-ref links." + (hi-lock-mode 1) (highlight-regexp org-ref-cite-re 'org-ref-cite-face) (highlight-regexp org-ref-label-re 'org-ref-label-face) (highlight-regexp org-ref-ref-re 'org-ref-ref-face)) + +(when org-ref-colorize-links + (add-hook 'org-mode-hook 'org-ref-colorize-links)) #+END_SRC #+RESULTS: -- 2.39.2