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

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

[elpa] externals/xeft b12a0f58ea 34/55: Factor out two faces xeft-excerp


From: ELPA Syncer
Subject: [elpa] externals/xeft b12a0f58ea 34/55: Factor out two faces xeft-excerpt-title and xeft-excerpt-body
Date: Fri, 13 Jan 2023 23:58:38 -0500 (EST)

branch: externals/xeft
commit b12a0f58ea12369770c56470da5355d7f8dd6989
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Factor out two faces xeft-excerpt-title and xeft-excerpt-body
    
    * xeft.el (xeft-excerpt-title, xeft-excerpt-body): New faces.
    (xeft--insert-file-excerpt): Use new faces.
---
 xeft.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/xeft.el b/xeft.el
index 1603a56d4d..3d19dd61b4 100644
--- a/xeft.el
+++ b/xeft.el
@@ -70,6 +70,14 @@
   '((t . (:inherit highlight :extend t)))
   "Face for highlighting in the preview buffer.")
 
+(defface xeft-excerpt-title
+  '((t . (:inherit (bold underline))))
+  "Face for the excerpt title.")
+
+(defface xeft-excerpt-body
+  '((t . (:inherit default)))
+  "Face for the excerpt body.")
+
 (defcustom xeft-default-extension "txt"
   "The default extension for new files created by xeft."
   :type 'string)
@@ -412,9 +420,9 @@ search phrase the user typed."
                               (point-max))))))))
     ;; Now we insert the excerpt
     (let ((start (point)))
-      (insert (propertize title 'face '(:weight bold))
+      (insert (propertize title 'face 'xeft-excerpt-title)
               "\n"
-              (propertize excerpt 'face '(:weight light))
+              (propertize excerpt 'face 'xeft-excerpt-body)
               "\n\n")
       ;; If we use overlay (with `make-button'), the button's face
       ;; will override the bold and light face we specified above.



reply via email to

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