diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index 54c3295..5c8539b 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0714.095527 +;; Version: 2020.0805.092134 ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons org-roam) ;; This program is free software; you can redistribute it and/or modify @@ -35,6 +35,7 @@ (require 'org-clock) (require 'org-edna) (require 'org-element) +(require 'org-faces) (require 'org-habit) (require 'org-roam) (require 'subr-x) @@ -140,21 +141,23 @@ After running it once remove it from `org-capture-after-finalize-hook'." (defun oni-org-generate-todo-keyword-faces () "Create faces for all todo keywords in the current buffer." - (when-let ((keywords (cl-remove-if (lambda (tag) (assoc tag org-todo-keyword-faces)) - org-todo-keywords-1))) - (append org-todo-keyword-faces - (mapcar (lambda (keyword) (cons keyword (oni-org-color-for keyword))) - keywords)))) + (if-let ((keywords (cl-remove-if (lambda (tag) (assoc tag org-todo-keyword-faces)) + org-todo-keywords-1))) + (append org-todo-keyword-faces + (mapcar (lambda (keyword) (cons keyword (oni-org-color-for keyword))) + keywords)) + org-todo-keyword-faces)) (defun oni-org-generate-tag-faces () "Create faces for all the tags in the current buffer." - (when-let ((tags (cl-remove-if (lambda (tag) (assoc (car tag) org-tag-faces)) - (org-get-buffer-tags)))) - (append org-tag-faces - (mapcar (lambda (tag) - (let ((tag (car tag))) - (cons tag (oni-org-color-for tag)))) - tags)))) + (if-let ((tags (cl-remove-if (lambda (tag) (assoc (car tag) org-tag-faces)) + (org-get-buffer-tags)))) + (append org-tag-faces + (mapcar (lambda (tag) + (let ((tag (car tag))) + (cons tag (oni-org-color-for tag)))) + tags)) + org-tag-faces)) (defun oni-org-set-todo-keyword-faces () "Set ‘org-todo-keyword-faces’ to all different colors."