Re: Customize Rogue

Richard Stallman <[email protected]> Fri, 14 Mar 2003 00:59:37 -0500
Newsgroups gmane.emacs.devel,gmane.emacs.customize
Message-ID <[email protected]>
    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.