GNU bug report logs - #20766
24.5; disable-theme leaves lingering effects

Previous Next

Package: emacs;

Reported by: Anders Papitto <anderspapitto <at> gmail.com>

Date: Mon, 8 Jun 2015 01:21:02 UTC

Severity: minor

Found in version 24.5

Fixed in version 28.1

Done: Mauro Aranda <maurooaranda <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at control <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 20766 <at> debbugs.gnu.org
Cc: Anders Papitto <anderspapitto <at> gmail.com>
Subject: Re: bug#20766: 24.5; disable-theme leaves lingering effects
Date: Sat, 8 Mar 2025 06:45:35 -0300
close 20766 28.1
quit


Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Anders Papitto <anderspapitto <at> gmail.com> writes:
>
>> When I run these commands from a fresh Emacs instance
>>
>> M-x load-theme RET solarized-light RET
>> M-x disable-theme RET solarized-light RET
>> M-x term RET RET
>>
>> the text background color in term-mode stays what it was set to by the
>> solarized-light theme. A very similar invocation does not have this
>> behavior:
>>
>> M-x term RET RET
>> C-c k RET yes RET
>> M-x load-theme RET solarized-light RET
>> M-x disable-theme RET solarized-light RET
>> M-x term RET RET
>>
>> i.e. If term mode gets to run before loading the theme, no bug.
>>
>
> This bug is still present.
>
> It looks like solarized still sets the obsoleted variables
> term-default-fg-color and term-default-bg-color, but still, the bug is
> in custom.el and it's related to Bug#21355.
>
> Here's a recipe:
> Save this theme into test-bug20766-theme.el, and arrange to load it.
> (deftheme test-bug20766)
>
> (custom-theme-set-variables
>  'test-bug20766
>  '(test-option 'foo))
>
> (provide-theme 'test-bug20766)
>
> emacs -Q
>
> M-x load-theme RET test-bug20766
> test-option is not yet known, so custom stores the theme setting under
> the saved-value property of test-option.
>
> M-x disable-theme RET test-bug20766
> The saved-value property should be nil, because the theme setting is no
> longer relevant.  However, it's still ('foo).
>
> Then eval the following defcustom:
> (defcustom test-option 'bar "..."
> :type 'symbol
> :group 'emacs)
>
> M-: test-option ==> foo, which is wrong.
>
> In the original recipe, that is how term-default-fg-color and
> term-default-bg-color get the solarized theme setting after loading
> term.

This is fixed since this commit:

commit 779c615f333a01d11ab930b030d61545fb048f3d
Author: Mauro Aranda <maurooaranda <at> gmail.com>
Date:   Mon May 10 13:33:32 2021 +0200

    Avoid saving session customizations in the custom-file

Closing.





This bug report was last modified 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.