From 9535fa8c078ca5ecb583ec4862f84028de018ae9 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Sun, 10 Mar 2024 14:11:43 +0100 Subject: [PATCH] Use new face org-caption for #+caption lines * lisp/org-faces.el: Add face `org-caption'. * lisp/org.el (org-fontify-meta-lines-and-blocks-1): Use `org-caption' instead of `org-block' as face for #+caption content. --- lisp/org-faces.el | 5 +++++ lisp/org.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 0e20de51a..633d539db 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -454,6 +454,11 @@ (defface org-block `((t :inherit shadow :group 'org-faces :version "26.1") +(defface org-caption '((t (:inherit org-block))) + "Face used for #+caption content." + :group 'org-faces + :version "30.1") + (defface org-block-begin-line '((t (:inherit org-meta-line))) "Face used for the line delimiting the begin of source blocks." :group 'org-faces) diff --git a/lisp/org.el b/lisp/org.el index d7d6a98b1..e3e12095c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5592,7 +5592,7 @@ (defun org-fontify-meta-lines-and-blocks-1 (limit) (add-text-properties (line-beginning-position) (match-end 1) '(font-lock-fontified t face org-meta-line)) (add-text-properties (match-end 0) (line-end-position) - '(font-lock-fontified t face org-block)) + '(font-lock-fontified t face org-caption)) t) ((member dc3 '(" " "")) ;; Just a comment, the plus was not there -- 2.43.2