unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Sean Peters" <sean.a.peters@googlemail.com>
Cc: 16755@debbugs.gnu.org
Subject: bug#16755: 24.3; customize-save-variable saves the wrong value
Date: Fri, 14 Feb 2014 13:23:56 -0500	[thread overview]
Message-ID: <jwvk3cxmubw.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <21246.13576.276212.697702@eddie.wibble.net> (Sean Peters's message of "Fri, 14 Feb 2014 15:23:52 +0000")

> 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





  reply	other threads:[~2014-02-14 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 15:23 bug#16755: 24.3; customize-save-variable saves the wrong value Sean Peters
2014-02-14 18:23 ` Stefan Monnier [this message]
2014-03-18 23:32   ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk3cxmubw.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=16755@debbugs.gnu.org \
    --cc=sean.a.peters@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).