1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-21 05:21:37 -07:00

Make ':extend' inherited from default spec unless overridden

* lisp/faces.el (face-spec-recalc): Handle the :extend attribute
specially and always inherit it from the default spec unless
overwritten in a theme (bug#37774).

* test/lisp/faces-tests.el (faces--test-data-dir): New variable.
(faces--test-extend-with-themes): Use test themes instead of ones
from etc/themes.  Update expected values.

* test/data/themes/faces-test-dark-theme.el: New file.

* test/data/themes/faces-test-light-theme.el: New file.

* doc/lispref/display.texi (Face Attributes):
Update the description of ':extend'.

* etc/NEWS: Update the entry for ':extend'.

* etc/themes/adwaita-theme.el:
* etc/themes/deeper-blue-theme.el:
* etc/themes/dichromacy-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/light-blue-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/misterioso-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/tango-theme.el:
* etc/themes/tsdh-dark-theme.el:
* etc/themes/tsdh-light-theme.el:
* etc/themes/wheatgrass-theme.el:
* etc/themes/wombat-theme.el: Remove the now-redundant ':extend'
attribute in all the themes.
This commit is contained in:
Dmitry Gutov 2019-12-10 02:11:15 +02:00
parent d8d537e173
commit 58fb4c3e68
19 changed files with 174 additions and 93 deletions

View file

@ -0,0 +1,33 @@
;;; faces-test-dark-theme.el --- A dark theme from tests ;;; -*- lexical-binding: t; -*-
;; Copyright (C) 2019 Free Software Foundation, Inc.
;; 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:
;;; Code:
(deftheme faces-test-dark
"")
(custom-theme-set-faces
'faces-test-dark
'(diff-added ((t (:foreground "Green" :extend t))))
'(diff-changed-face ((t (:foreground "Khaki"))))
'(diff-file-header-face ((t (:background "grey20" :foreground "ivory1")))))
(provide-theme 'faces-test-dark)
;;; faces-test-dark-theme.el ends here

View file

@ -0,0 +1,32 @@
;;; faces-test-light-theme.el --- A dark theme from tests ;;; -*- lexical-binding: t; -*-
;; Copyright (C) 2019 Free Software Foundation, Inc.
;; 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:
;;; Code:
(deftheme faces-test-light
"")
(custom-theme-set-faces
'faces-test-light
'(diff-added ((t (:inherit diff-changed :background "light green" :extend t))))
'(diff-changed ((t (:background "light steel blue")))))
(provide-theme 'faces-test-light)
;;; faces-test-light-theme.el ends here