GNU bug report logs - #37774
27.0.50; new :extend attribute broke visuals of all themes and other packages

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37774 <at> debbugs.gnu.org
Subject: bug#37774: 27.0.50; new :extend attribute broke visuals of all themes and other packages
Date: Thu, 24 Oct 2019 19:04:31 +0200
[Message part 1 (text/plain, inline)]
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> Yeah, so: what's the plan for Magit?
>
> Will the new version of it have to
>
> (if <emacs version is...>
>     (defface ...)
>   (defface ...)
>
> ?

> We should define and document a "migration path", e.g. say what a
> package author should do if they have a face which needs to be
> extended, preferably without breaking compatibility with Emacs 26.

Earlier in the thread[1] I suggested this method to avoid the duplicate
defface issue:

[demo.patch (text/x-diff, inline)]
--- magit-diff.el.bkp	2019-10-23 17:02:13.340410735 +0200
+++ magit-diff.el	2019-10-24 17:54:58.769446997 +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"
+     ,@(when (>= emacs-major-version 27) '(:extend t)))
     (((class color) (background dark))
      :background "grey25"
-     :foreground "grey70"))
+     :foreground "grey70"
+     ,@(when (>= emacs-major-version 27) '(:extend t))))
   "Face for diff hunk headings."
   :group 'magit-faces)
 
[Message part 3 (text/plain, inline)]
Would this be an acceptable migration path?  Magit requires Emacs≥25.1
if I am not mistaken; I don't know how portable this solution would be.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37774#212
    AFAICT no-one outright rejected this idea; I apologize if I missed
    someone pointing out shortcomings.

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.