emacs-devel
[Top][All Lists]
Advanced

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

RE: obsolete comment in tool-bar.el


From: Drew Adams
Subject: RE: obsolete comment in tool-bar.el
Date: Fri, 8 Jul 2005 11:53:10 -0700

        (defvar rogue-var) ;; to silence the compiler for the next line.
        (unless (default-boundp rogue-var) (setq rogue-var nil))
        (defcustom rogue-var ...
        ...
          :initialize 'custom-initialize-set
        ...)

    Suppose we implement a keyword in defcustom that causes it to generate
    all that.  That will look nice in the source code, but at execution
    time it will be equivalent to the above.

    I think that would be clearly better than all three of the above
    solutions.

Sounds great to me.

Or what about just reusing keyword :initialize, perhaps redefining its
behavior to recognize this special case? After all, this is about
initializing the value. The case could be distinguished by supplying
:initialize with an argument `custom-initialize-set-runtime' (or some better
name).

Ignore that suggestion if it makes little sense - I'm no pro on defcustom.

Anyway, I like the idea of implementing Luc's "ugly" code via a defcustom
keyword. Perhaps someone will point out problems with it, but I can't think
of any offhand.

Question: How will users see/detect/understand this behavior? What will they
see in "Show initial Lisp expression"? I assume the keyword behavior would
be documented, but I'm wondering what users will see in Customize.





reply via email to

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