emacs-devel
[Top][All Lists]
Advanced

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

Re: find-file-hook as illustration of Custom problems


From: Richard Stallman
Subject: Re: find-file-hook as illustration of Custom problems
Date: Sun, 06 Feb 2005 16:01:57 -0500

       For the case of hooks, we could imagine changing cus-edit.el so that
       edits made using Custom only affect elements that were installed using
       Custom.  Any other elements could be invisible and untouchable; or
       they might be displayed in a separate way as "program-added hooks" and
       untouchable through the usual Custom features.

    I believe the latter.  The user should know that there are other,
    untouchable things in the list.

      In effect, this means treating a single list as if it were the
      combination of too list values, one to be edited through Custom and
      one to be updated by programs.

    I guess that Custom could use an internal custom-list-var for every
    list-var.  Everything specified in the definition of the defcustom
    should be in custom-list-var and hence, removable.

The symbol property that records the value according to Custom
can serve this purpose.  Instead of saying "Changed outside Custom",
it can diff the two values to determine which elements were added
outside Custom and which were added within it.

After Custom is used to change the latter set, it can merge the two
sets.

custom-set-variable has to handle this too.

      So
    something in the type of a list to which elements can be added both
    through code and through Custom should say that Custom needs to use a
    custom-list-var.

Yes, we could try handling other kinds of lists in the same way
if it works for hooks.

    How do we determine whether a defcustom of type 'sexp' with standard
    value nil is intended to be a variable length list or not?

Don't worry about it yet.  One thing at a time.




reply via email to

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