From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57639: [PATCH] Add new command 'toggle-theme' Date: Mon, 19 Sep 2022 08:05:23 +0000 Message-ID: <87o7vbg56k.fsf@posteo.net> References: <875yhzmz25.fsf@posteo.net> <875yhzmj50.fsf@gnus.org> <875yhzl3a1.fsf@posteo.net> <87fsh25bso.fsf@gnus.org> <871qsil3jm.fsf@posteo.net> <87fsgygo7c.fsf@gnus.org> <87a676jfx2.fsf@posteo.net> <87bkrmdt46.fsf@gnus.org> <8735cxpx2r.fsf@posteo.net> <87k066yyn0.fsf@posteo.net> <877d269kgv.fsf@gnus.org> <87bkriyqci.fsf@posteo.net> <874jxa6kyj.fsf@gnus.org> <87o7vdg97w.fsf@posteo.net> <831qs926np.fsf@gnu.org> <871qs9fzz5.fsf@posteo.net> <83h715yxz2.fsf@gnu.org> <87h715dnut.fsf@posteo.net> <87edw955ls.fsf@gnus.org> <8735coewsk.fsf@posteo.net> <871qs7ztgq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2678"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 57639@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 19 10:18:54 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oaBzS-0000RM-95 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 10:18:54 +0200 Original-Received: from localhost ([::1]:41690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaBzP-0005aZ-M1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Sep 2022 04:18:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaBn1-0008Pv-S1 for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:06:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaBn0-0007Ne-Bh for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oaBn0-0007s0-1D for bug-gnu-emacs@gnu.org; Mon, 19 Sep 2022 04:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Sep 2022 08:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57639-submit@debbugs.gnu.org id=B57639.166357473230212 (code B ref 57639); Mon, 19 Sep 2022 08:06:02 +0000 Original-Received: (at 57639) by debbugs.gnu.org; 19 Sep 2022 08:05:32 +0000 Original-Received: from localhost ([127.0.0.1]:52241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBmV-0007rE-Te for submit@debbugs.gnu.org; Mon, 19 Sep 2022 04:05:32 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:44297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaBmU-0007r0-AE for 57639@debbugs.gnu.org; Mon, 19 Sep 2022 04:05:30 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C828E240028 for <57639@debbugs.gnu.org>; Mon, 19 Sep 2022 10:05:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663574724; bh=/zHbwRDV6ndLvJcSJF/lM2fh38wLR9xF8AyHlNhLIkk=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=dfJRREhJxIlaojbSqV11YeGvva6TEUD/98qdNL89xp9JxEx1+M+B/jN5l7B4Tc5K+ CnnrfHhY2kPlBEwSqNrlLc3J6iGgHzNDVPguy1XP75kQ27V7af9jE/kENP+hZscAX6 uZ9cON4VHW0yQURcRBDxGDjTDCX5uxjx5K8ry8U/6bYlgOrKazGNeUYJmqdUVObl92 q+e1ELdZB2cCsCcPva/qdDiRHtIy8Aw83v/39PgKDKFDu2vxq/HgksUCllsc9WE8uE Ru12PRvneImfZ+bPkXK2FN0hKYJtbIT+ea6TXzZeNtXUASa6lMYz2sd0avDGcQadIW LQRpPoNxMENsA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MWHKc1q2sz9rxT; Mon, 19 Sep 2022 10:05:24 +0200 (CEST) In-Reply-To: <871qs7ztgq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 19 Sep 2022 09:58:13 +0200") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243042 Archived-At: Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> One last additional, I've added a property to all the themes indicating >> that they are colour schemes. This would make it easier to toggle >> between dark and light modes if multiple themes are enabled of which >> only one is a colour theme: > > Makes sense. One thing that occurred to me now that I didn't think of > before is: > >> (deftheme adwaita >> "Face colors similar to the default theme of Gnome 3 (Adwaita). >> The colors are chosen to match Adwaita window decorations and the >> -default look of the Gnome 3 desktop.") >> +default look of the Gnome 3 desktop." >> + :background-mode 'light >> + :kind 'color-scheme) > > Is this backwards compatible, and is that something we need to care > about? I know that some (many?) themes are also distributed outside of > Emacs, and should work under a range of Emacs versions. I don't think > extending `deftheme' in this way would be backwards compatible, though, > even if it makes sense from a language design point of view. I don't think so, but if a theme were concerned about this, all they need to do is (put 'theme-name 'theme-properties '(:background-mode light :kind color-scheme)) As that is all the macro does. As I said, we could do this too and add a autoload-cookie before it to solve the visibility issue, but it doesn't look that nice... Can (deftheme)s be autoloaded?