org-wikinodes: Fix fontification
* contrib/lisp/org-wikinodes.el (org-wikinodes-add-to-font-lock-keywords): Properly install fontification mechanism. Small refactoring. Suggested-by: Scott Campbell <scott.campbell@uwaterloo.ca> <http://permalink.gmane.org/gmane.emacs.orgmode/94683>
This commit is contained in:
parent
7e4228a137
commit
a9a9af030d
|
@ -316,11 +316,10 @@ with working links."
|
|||
|
||||
(defun org-wikinodes-add-to-font-lock-keywords ()
|
||||
"Add wikinode CamelCase highlighting to `org-font-lock-extra-keywords'."
|
||||
(let ((m (member '(org-activate-plain-links) org-font-lock-extra-keywords)))
|
||||
(if m
|
||||
(setcdr m (cons '(org-wikinodes-activate-links) (cdr m)))
|
||||
(message
|
||||
"Failed to add wikinodes to `org-font-lock-extra-keywords'."))))
|
||||
(let ((m (member '(org-activate-plain-links (0 'org-link t))
|
||||
org-font-lock-extra-keywords)))
|
||||
(if m (push '(org-wikinodes-activate-links) (cdr m))
|
||||
(message "Failed to add wikinodes to `org-font-lock-extra-keywords'."))))
|
||||
|
||||
(add-hook 'org-font-lock-set-keywords-hook
|
||||
'org-wikinodes-add-to-font-lock-keywords)
|
||||
|
|
Loading…
Reference in New Issue