lisp/org-faces.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 8b0e387e6..637d32c30 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -179,7 +179,9 @@ set the properties in the `org-column' face. For example, set :group 'org-faces) (defface org-date - '((((class color) (background light)) (:foreground "Purple" :underline t)) + ;; NOTE: `fixed-pitch' ensures compatibility with `variable-pitch-mode' + '((default :inherit fixed-pitch) + (((class color) (background light)) (:foreground "Purple" :underline t)) (((class color) (background dark)) (:foreground "Cyan" :underline t)) (t (:underline t))) "Face for date/time stamps." @@ -355,7 +357,9 @@ changes." (sexp :tag "Face"))))) (defface org-table ;Copied from `font-lock-function-name-face' - '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) + ;; NOTE: `fixed-pitch' ensures compatibility with `variable-pitch-mode' + '((default :inherit fixed-pitch) + (((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) @@ -371,7 +375,9 @@ changes." :group 'org-faces) (defface org-formula - '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) + ;; NOTE: `fixed-pitch' ensures compatibility with `variable-pitch-mode' + '((default :inherit fixed-pitch) + (((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 8) (background light)) (:foreground "red")) (((class color) (min-colors 8) (background dark)) (:foreground "red")) @@ -384,7 +390,8 @@ changes." :group 'org-faces :version "22.1") -(defface org-meta-line '((t :inherit font-lock-comment-face)) +;; NOTE: `fixed-pitch' ensures compatibility with `variable-pitch-mode' +(defface org-meta-line '((t :inherit (fixed-pitch font-lock-comment-face))) "Face for meta lines starting with \"#+\"." :group 'org-faces :version "22.1") @@ -408,7 +415,8 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword." "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords." :group 'org-faces) -(defface org-block `((t :inherit shadow +;; NOTE: `fixed-pitch' ensures compatibility with `variable-pitch-mode' +(defface org-block `((t :inherit (fixed-pitch shadow) ,@(and (>= emacs-major-version 27) '(:extend t)))) "Face text in #+begin ... #+end blocks. For source-blocks, `org-src-block-faces' takes precedence."