Function: org-modern--todo

org-modern--todo is a natively compiled function defined in org-modern.el.

Signature

(org-modern--todo)

Documentation

Prettify headline todo keywords.

Source Code

;; Defined in /nix/store/0fwir9vccqq0yiqnswyf22ip3sl68f49-emacs-packages-deps/share/emacs/site-lisp/elpa/org-modern-20260722.1411/org-modern.el
(defun org-modern--todo ()
  "Prettify headline todo keywords."
  (let ((todo (match-string-no-properties 1))
        (beg (match-beginning 1))
        (end (match-end 1)))
    (put-text-property beg (1+ beg) 'display
                       (format #(" %c" 1 3 (cursor t)) (char-after beg)))
    (put-text-property (1- end) end 'display (string (char-before end) ?\s))
    (put-text-property
     beg end 'face
     (if-let* ((face (or (cdr (assoc todo org-modern-todo-faces))
                         (cdr (assq t org-modern-todo-faces)))))
         `(,face org-modern-label)
       (if (string-match-p org-not-done-regexp todo)
           'org-modern-todo 'org-modern-done)))))