branch: externals/xeft commit b12a0f58ea12369770c56470da5355d7f8dd6989 Author: Yuan Fu <caso...@gmail.com> Commit: Yuan Fu <caso...@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.