branch: externals/modus-themes
commit cb99f74bc9d98f99e2e6ada85203368a816fbfca
Merge: 0358a2a460 9649a18f69
Author: Protesilaos Stavrou <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #188 from rudolf-adamkovic/main
    
    Fix incorrect face inheritance affecting AUCTeX
---
 modus-themes.el             |  2 +-
 tests/modus-themes-tests.el | 50 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/modus-themes.el b/modus-themes.el
index bffb513a87..21c66d60db 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -4777,7 +4777,7 @@ If COLOR is unspecified, then return :box unspecified."
     `(font-latex-math-face ((,c :foreground ,constant)))
     `(font-latex-script-char-face ((,c :inherit modus-themes-bold :foreground 
,builtin)))
     `(font-latex-sectioning-5-face ((,c :inherit modus-themes-bold :foreground 
,fg-alt)))
-    `(font-latex-sedate-face ((,c :inherit mouds-themes-bold :foreground 
,keyword)))
+    `(font-latex-sedate-face ((,c :inherit modus-themes-bold :foreground 
,keyword)))
     `(font-latex-slide-title-face ((,c :inherit modus-themes-heading-1)))
     `(font-latex-string-face ((,c :foreground ,string)))
     `(font-latex-subscript-face ((,c :height 0.9)))
diff --git a/tests/modus-themes-tests.el b/tests/modus-themes-tests.el
new file mode 100644
index 0000000000..057b6fee87
--- /dev/null
+++ b/tests/modus-themes-tests.el
@@ -0,0 +1,50 @@
+;;; modus-themes-test.el --- Unit tests for the Modus themes -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2025  Free Software Foundation, Inc.
+
+;; Author: Rudolf Adamkovič <[email protected]>
+;; Maintainer: Protesilaos Stavrou <[email protected]>
+;; URL: https://github.com/protesilaos/modus-themes
+
+;; This file is NOT part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Tests for the Modus themes.
+
+;;; Code:
+
+(require 'ert)
+(require 'modus-themes)
+
+;; Third-party packages, loaded if possible.
+(require 'font-latex nil t)
+
+(ert-deftest modus-themes-test-inheritance ()
+  "Ensure all faces inherit from valid faces."
+  (modus-themes-select 'modus-operandi)
+  (should-not (seq-filter
+               (lambda (face)
+                 ;; The face either has no parent ...
+                 (if-let* ((parent (face-attribute face :inherit)))
+                     (and (symbolp parent)
+                          (not (eq parent 'unspecified))
+                          ;; ... or its parent is a valid face.
+                          (not (facep parent)))))
+               (face-list))))
+
+(provide 'modus-themes-test)
+;;; modus-themes-test.el ends here

Reply via email to