emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doc elisp intro cross reference fixes


From: Richard Stallman
Subject: Re: doc elisp intro cross reference fixes
Date: Sun, 30 Nov 2003 20:45:23 -0500

    Note that the optional argument is not the only difference between
    `customize-set-variable' and `set-variable'.  Differences if both are
    called without optional argument on a variable VAR:

    1.  If VAR already has a buffer-local binding `set-variable' sets that
        buffer-local binding _even_ when called without prefix argument.
        The prefix argument just guarantees that a buffer-local binding
        will be made if there was none before.  `custom-set-variable' sets
        the default value.

    2.  If we enter a form in the minibuffer, set-variable uses the
        unevaluated value, custom-set-variable the evaluated value.

To change those details of set-variable would be an incompatible change not
motivated by any user benefit.  Not a good thing.

    The problem is that :set functions usually are not written to deal
    with buffer-local values.  The authors of :set functions are not to
    blame for that, because (elisp)Customization does not mention
    anything about dealing with buffer-local-values:

       The default for SETFUNCTION is `set-default'.

This seems like a substantial obstacle.  The only clean
solution I can see would require defining, for each customizable
variable, how to set it locally.  That would be a lot of work.

So I guess we have to keep set-variable separate.  However,
when it operates on a variable that is customizable, and when
the binding it sets is a global binding, then it could work
through the Custom mechanism.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]