emacs-devel
[Top][All Lists]
Advanced

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

Re: featurep


From: Kim F. Storm
Subject: Re: featurep
Date: 21 Mar 2002 14:12:56 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

Richard Stallman <address@hidden> writes:

>     Having make-network-process doing something other than making a
>     network process is not a more intuitive solution than featurep.
> 
> That is exactly what bothers me about it.
> 
> Perhaps we can implement use of lists as subfeatures.  Then
> (featurep 'make-network-process '(:family local)) could be used
> instead of (make-network-process :feature :family 'local).

Good idea.  I've done that!

Using featurep has the added bonus of being able to test for
networking support in general with (featurep 'make-network-process).

You can use (get 'make-network-process 'subfeatures) to get a list of
all supported (non-standard) networking features.

I'm don't know whether this is an officially supported way to access
subfeatures (?), but it allows us to enhance e.g. report-emacs-bug to
include the list of supported networking features if you think that
might be interesting.

I didn't include all the standard features, so while
  (featurep 'make-network-process '(:family local))
returns t iff local sockets are supported, testing with
  (featurep 'make-network-process '(:family nil))
returns nil, because the default is always supported, so there
is no reason to (be able to) test for it.  Is that ok?

BTW, I've changed Ffeaturep to use Fmember instead of Fmemq to compare
features, so we can now use all sorts of data (e.g. lists or strings)
as subfeatures.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

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