emacs-devel
[Top][All Lists]
Advanced

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

Re: Customize and autoloaded libraries


From: Per Abrahamsen
Subject: Re: Customize and autoloaded libraries
Date: Mon, 03 Dec 2001 14:33:57 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

The special form defcustom works like defvar, it doesn't touch options
that are already defined.  This includes any option with saved
customizations.

The idea is that you either use Lisp or customize to set an option,
customize will not try to "merge" the two values, it will just submit
to the Lisp code.  If you have a variable it may make sense for other
Lisp code to set, it should be delclared separately from the user
option.

The solutions I see are:

1. Keep user options and variables set by Lisp packages separate.

2. Invent a `defhook' declaration for hooks, which is like defcustom
   but allows merging the same way as add-hook.  I wanted to do that
   originally, but couldn't come up with a good design.

3. Write a general merge algorithm for all options.  This also solves
   the problem of options with large or fragile (over versions)
   initial values, like "load-path".

They are listed in order of increasing complexity, which is why I
prefer #1.  I find the customize code more than complex enough as it
is.



reply via email to

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