Function: org-modern--star
org-modern--star is a natively compiled function defined in
org-modern.el.
Signature
(org-modern--star)
Documentation
Prettify headline stars.
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--star ()
"Prettify headline stars."
(let* ((beg (match-beginning 1))
(end (match-end 1))
(level (- end beg))
(hide-leading (and (eq org-modern-hide-stars 'leading)
(not (bound-and-true-p org-indent-mode)))))
(when (and org-modern--hide-stars-cache (not (eq beg end)))
(cl-loop for i from beg below end do
(put-text-property i (1+ i) 'display
(nth (logand i 1)
org-modern--hide-stars-cache))))
(when org-modern-star
(when (and hide-leading org-hide-leading-stars)
(put-text-property beg (1+ end) 'face (get-text-property end 'face)))
(put-text-property
(if hide-leading beg end)
(1+ end) 'display
(let ((cache (if (and org-modern--folded-star-cache
(org-invisible-p (pos-eol)))
org-modern--folded-star-cache
org-modern--expanded-star-cache)))
(aref cache
(if org-modern-cycle-stars
(mod level (length cache))
(min (1- (length cache)) level))))))))