On 2015-10-05 11:39 -0500, Derek Martin wrote:

> > I am trying to add a feature dependent on a new string option (call
> > it opt_foo), and I contrived to do different things when the C
> > variable corresponding to the option is NULL, vs. when it points to
> > the empty string.  But when I run my patched binary and I do
> 
> Ah.  This question really belongs on the dev list, not this one.  That
> said, it's been an extremely long time since I've looked at the code
> that handles options in Mutt, but I think there's a way to do what you
> want.  You could probably look at the code that handles the hostname
> variable, since it does that.

The case of hostname is different in that there is a sensible,
inferrable default for it, which mutt fills in during startup if muttrc
doesn't set it.  So hostname (Fqdn in the code) is never really NULL,
and there is no special behavior activated by leaving it unset (that is,
no behavior that cannot be achieved by setting it to the natural value).

For my option, there is no sensible default except the empty string.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.

Reply via email to