From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why is custom--inhibit-theme-enable not t by default? Date: Tue, 12 Jun 2018 19:37:16 +0300 Message-ID: <83vaao3qrn.fsf@gnu.org> References: <10b7bd657091b074d8da1bf1ae35b1f4.squirrel@dancol.org> <83h8m8owp2.fsf@gnu.org> <48a7bd1277a18dd0a68d06cd8b022062.squirrel@dancol.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1528821347 4321 195.159.176.226 (12 Jun 2018 16:35:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2018 16:35:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: dancol@dancol.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 12 18:35:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSmGk-00011C-4D for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2018 18:35:42 +0200 Original-Received: from localhost ([::1]:57331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSmIr-0005nv-0p for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2018 12:37:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSmIA-0005nk-Bu for emacs-devel@gnu.org; Tue, 12 Jun 2018 12:37:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSmI7-0000yb-9I for emacs-devel@gnu.org; Tue, 12 Jun 2018 12:37:10 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSmI7-0000yX-53; Tue, 12 Jun 2018 12:37:07 -0400 Original-Received: from [176.228.60.248] (port=4061 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fSmI6-0006v6-Jy; Tue, 12 Jun 2018 12:37:07 -0400 In-reply-to: <48a7bd1277a18dd0a68d06cd8b022062.squirrel@dancol.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226264 Archived-At: > Date: Tue, 12 Jun 2018 08:42:40 -0700 > From: dancol@dancol.org > Cc: dancol@dancol.org, > emacs-devel@gnu.org > > > I think themes are special in this regard: loading a theme activates > > it. > > Why did we do it that way? History, I guess. AFAIR, it always has been that way. Maybe we did it for compatibility with themes that were available outside of Emacs before Emacs supported themes? Or maybe because themes are just giant series of variable settings? I really don't know. We have this commentary in custom.el: ;; Each theme is stored in a theme file, with filename THEME-theme.el. ;; Loading a theme basically involves calling (load "THEME-theme") ;; This is done by the function `load-theme'. Loading a theme ;; automatically enables it. You will see that load-theme reads the file, then evaluates the buffer, so 'load' will do the same. > Is it too late to change it? Loading _anything_ shouldn't activate > it. I don't see a need to carve out a special case for themes. I honestly don't know. I don't use themes, except for testing bugs people report in them. Maybe ask on reddit? > At the very least, we should make custom--inhibit-theme-enable a public > variable so people can let-binding something that lets them load theme > code normally without the expectation of serious side effects. I'm okay with that, provided that we keep an alias with the old name.