GNU bug report logs -
#37774
27.0.50; new :extend attribute broke visuals of all themes and other packages
Previous Next
Reported by: Andrey Orst <andreyorst <at> gmail.com>
Date: Wed, 16 Oct 2019 07:32:01 UTC
Severity: normal
Found in version 27.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #212 received at 37774 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Andrey Orst <andreyorst <at> gmail.com> writes:
> (defface foo...)
> (when (>= emacs-major-version 27)
> (set-face-attribute foo... :extend t))
Unless I'm mistaken, this has the disadvantage of making Custom confused
as to who changed the face, i.e. M-x customize-face RET foo... RET will
say that the face was "CHANGED outside Customize". For all intents and
purposes a package author may wish the face to be described as
"STANDARD" as long as no theming or user customization has been applied.
Maybe some backquote trickery may help?
[magit-extend-demo.patch (text/x-patch, inline)]
--- magit-diff.el.bkp 2019-10-17 20:29:21.771892709 +0200
+++ magit-diff.el 2019-10-17 20:53:47.927829447 +0200
@@ -509,12 +509,14 @@
:group 'magit-faces)
(defface magit-diff-hunk-heading
- '((((class color) (background light))
+ `((((class color) (background light))
:background "grey80"
- :foreground "grey30")
+ :foreground "grey30"
+ ,@(unless (version<= emacs-version "27") '(:extend t)))
(((class color) (background dark))
:background "grey25"
- :foreground "grey70"))
+ :foreground "grey70"
+ ,@(unless (version<= emacs-version "27") '(:extend t))))
"Face for diff hunk headings."
:group 'magit-faces)
[Message part 3 (text/plain, inline)]
(I did not look for a way to factor out the (:extend t) into a leading
(default …) clause, but there ought to be a way to do it.)
This method should be usable by theme authors too, crufty as it looks…
This bug report was last modified 5 years and 162 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.