On Thu Apr 14 2011 Stefan Monnier wrote:
> >> I suggest change all these defcustom instances something like:
> >> 
> >> (defcustom bbdb-create-hook nil
> >> :group 'bbdb
> >> :type 'hook)
> >> (add-hook 'bbdb-create-hook 'bbdb-creation-date)
> 
> > Agreed and thanks, that looks much cleaner!
> 
> But then don't define them as defcustom but just defvars since Custom
> gets confused by the add-hook.

One more thought on this:

What should someone do who simply wants the hook to be nil?
If add-hook is called explicitly in bbdb.el such people are stuck:
their setting is lost when bbdb.el is loaded (whereas there was no
such problem with the original code where the default value of the hook
variable is set with a call to defcustom).

It seems to me that whatever scheme is used here, at best it can
only make some people happy. Oh well!

(Yet here it is probably more likely that people want to add
elements to the hook than making it nil. This makes calling add-hook
in bbdb.el the better solution here.)

Roland

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to