emacs-devel
[Top][All Lists]
Advanced

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

Re: Customize Rogue


From: Richard Stallman
Subject: Re: Customize Rogue
Date: Fri, 14 Mar 2003 00:59:37 -0500

    What I propose is that, if somebody writes a defcustom for a variable
    `foo' with a :set function, then, unless there already is an obvious
    well-known Lisp alternative, in which case there is no problem, the
    author of the defcustom should provide a function `foo' such that
    (foo value) is equivalent with setting foo to VALUE using defcustom.

This naming convention would be a bad one.  A name that fits well
for the variable would be wrong for the function.

    I don't think that is reasonable, the function signature expected by
    :set is slightly different from the the function signature that would
    be most natural from Lisp.

That is true also.  In fact

      (decustom foo-bar-mode nil
        "Foo bar minor mode.
      Must be set with (foo-bar-mode VALUE) or through Customize."
        :type 'boolean
        :set (lambda (symbol value) (foo-bar-mode value)))

is a good example of a simple lambda that is reasonable to use in a :set.




reply via email to

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