1 line
1.2 KiB
Plaintext
1 line
1.2 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>Hello! I am wondering if anyone can share me a working code snippet which adds font-lock keywords to org-mode via 'font-lock-add-keywords'. The following is my code (which does not work):</p> <p><code> (font-lock-add-keywords 'org-mode '(;; TODO wrapped between whitespace ("\\s-TODO\\s-" 0 '(t :foreground "orange") 'prepend) ;; FIXME wrapped between whitespace ("\\s-FIXME\\s-" 0 '(t :foreground "deep pink") 'prepend) ;; REVIEW wrapped between whitespace ("\\s-REVIEW\\s-" 0 '(t :foreground "orchid") 'prepend) ;; COMMENT wrapped between whitespace ("\\s-COMMENT\\s-" 0 '(t :foreground "turquoise") 'prepend) )) </code> A basically identical piece of code works for emacs-lisp-mode but not org-mode — and I have no idea why.</p> <p>Any help?</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/FluentFelicity"> /u/FluentFelicity </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/pn3mxt/orgmode_fontlockaddkeywords/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/pn3mxt/orgmode_fontlockaddkeywords/">[comments]</a></span> |