[Top][All Lists]

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

Re: What's the right way to detect libxml2?

From: Phillip Lord
Subject: Re: What's the right way to detect libxml2?
Date: Sun, 22 Oct 2017 16:27:15 -0000
User-agent: SquirrelMail/1.5.2 [SVN]

On Sun, October 22, 2017 2:14 pm, Clément Pit-Claudel wrote:
> Hi emacs-devel,
> In Flycheck we use ``libxml-parse-region`` if available, and fall back to
> ``xml-parse-region`` otherwise.  We recently realized that our libxml
> detection code was wrong, however.
> We used to write ``(if (fboundp 'libxml-parse-region)
> (libxml-parse-region …) (xml-parse-region …))``, but this isn't
> sufficient on Windows, where ``fboundp`` succeeds if Emacs was compiled
> with libxml support, even if the appropriate DLL isn't installed on the
> user's system.
> What's the proper way to autodetect libxml? We're thinking of doing this
> instead::
> (if (and (fboundp 'libxml-parse-region)
> (with-temp-buffer
> (insert "<xml/>")
> (libxml-parse-region (point-min) (point-max))))
> (libxml-parse-region …)
> (xml-parse-region …))
> Do we have better options?

We need a better option, as it happens. I have the same problem when
building the windows binary package. I've got no way of testing whether
libxml (or any of the other DLLs) are present or work.


reply via email to

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