branch: externals/taxy-magit-section
commit dfedd0a77a981de868788f1216f6d1c704c3414f
Author: Adam Porter <a...@alphapapa.net>
Commit: Adam Porter <a...@alphapapa.net>

    Change (taxy-magit-section-insert): Keep faces from heading-face-fn
    
    Don't override faces set by a taxy's heading-face-fn; instead, add to
    them using add-face-text-property.
---
 taxy-magit-section.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/taxy-magit-section.el b/taxy-magit-section.el
index 7b8814b109..56822e229f 100644
--- a/taxy-magit-section.el
+++ b/taxy-magit-section.el
@@ -127,7 +127,12 @@ which blank lines are inserted between sections at that 
level."
                  (taxy depth)
                  (let ((magit-section-set-visibility-hook 
magit-section-set-visibility-hook)
                        (taxy-magit-section-level-indent 
(taxy-magit-section-level-indent taxy))
-                       (taxy-magit-section-item-indent 
(taxy-magit-section-item-indent taxy)))
+                       (taxy-magit-section-item-indent 
(taxy-magit-section-item-indent taxy))
+                       (taxy-name (copy-sequence (taxy-name taxy))))
+                   (add-face-text-property
+                    0 (length taxy-name)
+                    (funcall (taxy-magit-section-heading-face-fn taxy) depth)
+                    nil taxy-name)
                    (cl-typecase taxy
                      (taxy-magit-section
                       (when (taxy-magit-section-visibility-fn taxy)
@@ -138,8 +143,7 @@ which blank lines are inserted between sections at that 
level."
                        (make-string (* (if (< depth 0) 0 depth)
                                        (taxy-magit-section-level-indent taxy))
                                     ? )
-                       (propertize (taxy-name taxy)
-                                   'face (funcall 
(taxy-magit-section-heading-face-fn taxy) depth))
+                       taxy-name
                        (format " (%s%s)"
                                (if (taxy-description taxy)
                                    (concat (taxy-description taxy) " ")

Reply via email to