Aidan Kehoe <kehoea(a)parhasard.net> writes:
Ar an seachtú lá is fiche de mà Feabhra, scrÃobh Hrvoje
NikÅ¡iÄ.:
> Aidan Kehoe <kehoea(a)parhasard.net> writes:
>
> > -(defcustom mail-user-agent 'sendmail-user-agent
> > +(defcustom mail-user-agent 'vm-user-agent
>
> Shouldn't you check whether the VM package is available before using
> it?
Yeah. I paid too much attention to the spirit of the rest of the file, which
happily uses the message, mh-e and gnus user agents without checking if they
were installed.
Those other places don't expect their respective targets to be
available *by default* -- the user has to specifically request them.
(Although it would be nice for non-existent packages to not be offered
in Customize value menus.)
On further examination, is that even possible? The defcustom
:initialize argument seems to be related, but when I try to use it I
get a core dump on startup.
AFAIK you can simply use a Lisp expression like this:
(defcustom mail-user-agent (if (locate-library "vm")
'vm-user-agent
'mail-user-agent)
...)