[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16755: 24.3; customize-save-variable saves the wrong value
From: |
Stefan Monnier |
Subject: |
bug#16755: 24.3; customize-save-variable saves the wrong value |
Date: |
Fri, 14 Feb 2014 13:23:56 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> I think customize-save-variable should use (default-value variable)
> instead of value in all the places it currently uses value after the
> call to custom-set.
But that can't work: a "custom variable" may not even have
a `default-value'. The :get and :set are free to completely change
between the world of "value as seen by Custom and the end user" and "the
world of Elisp" where that corresponding value can be represented in
completely different ways.
This is rarely used, admittedly, but attempts at providing support for
Customizing keymaps or things like `load-path' rely on this feature.
So I think the better course is to document that the ":set" function should
not modify its `val' argument destructively.
Stefan