GNU bug report logs -
#15687
Disabling custom theme does not reset vars
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 22 Oct 2013 20:56:01 UTC
Severity: normal
Tags: fixed
Merged with 34027
Found in versions 24.3.50, 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> I'm sorry if I've misunderstood something after skimming this bug
> report, but I think the following recipe, starting from emacs -Q,
> illustrates the central issue:
>
> ;; Sample custom theme touching user options and faces.
> (with-temp-file (expand-file-name "foo-theme.el" custom-theme-directory)
> (insert "\
> (deftheme foo)
> (custom-theme-set-variables 'foo '(text-quoting-style 'curved))
> (custom-theme-set-faces 'foo '(default ((t :foreground \"white\"
> :background \"black\"))))
> (provide-theme 'foo)\n"))
>
> ;; Make changes conflicting with theme `foo'.
> (setq text-quoting-style 'grave)
> (set-foreground-color "green")
>
> ;; Load, enable, and disable theme `foo'.
> (load-theme 'foo t)
> (disable-theme 'foo)
>
> At the end of this, the value of text-quoting-style and the foreground
> of the default face are nil and "black", respectively.
Thanks. Looks like a good recipe which finally describes the problem.
> Wouldn't it be less intrusive if they were reverted to the values they
> held before enabling foo-theme, namely 'grave and
> "green", respectively?
There is no question about that, yes: the code is clearly written with
the intention to reset those values to `grave` and "green".
I'm not very familiar with this code, but I know that there's some
attempt to make this work by saving the "externally modified" values
into a special theme called "changed" (as opposed to the changes made
via Custom which are saved in the special theme called "user").
So IIUC the above recipe shows that this special code either doesn't
properly save the settings to the "changed" theme, or they're not
properly used when recomputing the var's values in response to
`disable-theme`.
Stefan
This bug report was last modified 4 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.