emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dslide 1c92fef5e6 004/230: Add an overriding face to the b


From: ELPA Syncer
Subject: [nongnu] elpa/dslide 1c92fef5e6 004/230: Add an overriding face to the breadcrumbs
Date: Sun, 7 Jul 2024 19:00:06 -0400 (EDT)

branch: elpa/dslide
commit 1c92fef5e624c7de1b0310697072e8f1caa2c8fb
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>

    Add an overriding face to the breadcrumbs
    
    By using `add-face-text-property', this option allows us to tweak the
    breadcrumbs while using existing Heading faces.
---
 org-tree-slide.el | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/org-tree-slide.el b/org-tree-slide.el
index 4b840077b1..7f20129ad1 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -171,6 +171,14 @@ nil: keep the same position.  The slideshow will start 
from the heading
   :type 'boolean
   :group 'org-tree-slide)
 
+(defcustom org-tree-slide-breadcrumb-face nil
+  "Face added to the list of faces for breadcrumbs.
+This can be a face name symbol or an anonymous font spec.  It
+will be added to the face list, meaning it the original face's
+properties remain unless shadowed."
+  :type 'face
+  :group 'org-tree-slide)
+
 (defcustom org-tree-slide-skip-done nil
   "Specify to show TODO item only or not."
   :type 'boolean
@@ -863,7 +871,13 @@ concat the headers."
                  'no-tags
                  org-tree-slide-breadcrumbs-hide-todo-state)
                 parents))
-        (seq-reduce reducer parents nil)))))
+        (let ((breadcrumbs (seq-reduce reducer parents nil)))
+          (when org-tree-slide-breadcrumb-face
+            (add-face-text-property 0 (length breadcrumbs)
+                                    org-tree-slide-breadcrumb-face
+                                    nil
+                                    breadcrumbs))
+          breadcrumbs)))))
 
 (defun org-tree-slide--set-slide-header (blank-lines)
   "Set the header with overlay.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]