[Top][All Lists]

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

RE: face for non-ASCII characters

From: Drew Adams
Subject: RE: face for non-ASCII characters
Date: Sat, 16 Apr 2011 09:27:54 -0700

> DA> Why set up autoloading here?  Seems like you would want 
> DA> to either soft-require the library (no error if not there)
> DA> or simply test whether the function is defined (which
> DA> presumably happens when the library is loaded).
> DA>
> DA> IOW, why don't you just choose between (require 'foo nil 
> DA> t) and (fboundp 'foobar)?  What's the point of having
> DA> this library autoload the other one but not soft-require it?
> Lennart wants to conditionally, if idn.el is available, to enable its
> use in the defcustom so things Just Work for the user:
> (defcustom markchars-what
>   `(markchars-simple-pattern
>     markchars-confusables
>     ,@(when (fboundp 'idn-is-recommended) '(markchars-nonidn-fun)))

I understand that.  But it seems to me that either we want to unconditionally
load idn.el if available (in `load-path') or we do not want to do that.  In the
latter case, we are leaving it up to the user to load it if s?he wants.  And in
that case the proper test is simply `fboundp'.

I still don't see the point of the middle ground you're scoping out, of
autoloading but not soft-requiring.

When this library (the other one, not idn.el) is loaded, do you want idn.el to
have been loaded or not?  If you do, then soft-require.  If you want to leave
that choice up to the user, then test with `fboundp'.

What am I missing?

> I'm not sure what's the right approach, but IMO (require 'idn 
> nil t) is the simplest solution.

`fboundp' is just as simple.  It's not about simple, I think.

It's about deciding what's best for most users.  Do we want this library to load
idn.el whenever it is in the `load-path' or not?

reply via email to

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