[Top][All Lists]

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

Re: face for non-ASCII characters

From: Ted Zlatanov
Subject: Re: face for non-ASCII characters
Date: Sat, 16 Apr 2011 11:13:16 -0500
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

On Sat, 16 Apr 2011 18:01:12 +0200 Lennart Borgman <address@hidden> wrote: 

LB> Why? (fboundp 'idn-is-recommended) only returns true if the function
LB> is defined or autoloaded. If idn.el is not available the function
LB> should not be autoloaded, or?

My example showed that `fboundp' returns t if the function is
autoloaded, even if it's not actually loaded yet.

(when (autoload 'coocoo1 "coo")
  (fboundp 'coocoo1))

=> t


=> Debugger entered--Lisp error: (file-error "Cannot open load file" "coo")

On Sat, 16 Apr 2011 09:00:08 -0700 "Drew Adams" <address@hidden> wrote: 

DA> Why set up autoloading here?  Seems like you would want to either 
DA> the library (no error if not there) or simply test whether the function is
DA> defined (which presumably happens when the library is loaded).

DA> IOW, why don't you just choose between (require 'foo nil t) and (fboundp
DA> 'foobar)?  What's the point of having this library autoload the other one 
DA> 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
    ,@(when (fboundp 'idn-is-recommended) '(markchars-nonidn-fun)))

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


reply via email to

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