unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: jasonr@gnu.org, emacs-devel@gnu.org
Subject: Re: featurep
Date: 21 Mar 2002 14:12:56 +0100	[thread overview]
Message-ID: <5xit7qgj3b.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200203210904.g2L94HA10124@wijiji.santafe.edu>

Richard Stallman <rms@gnu.org> 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 <storm@cua.dk> http://www.cua.dk


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-21 13:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200203190844.g2J8iOq09224@wijiji.santafe.edu>
2002-03-19 13:39 ` featurep Kim F. Storm
2002-03-19 19:24   ` featurep Jason Rumney
2002-03-19 21:20     ` featurep Stefan Monnier
2002-03-19 23:09       ` featurep Kim F. Storm
2002-03-19 23:19         ` featurep Stefan Monnier
2002-03-19 23:48           ` featurep Kim F. Storm
2002-03-20  0:03             ` featurep Stefan Monnier
2002-03-19 22:59     ` featurep Kim F. Storm
2002-03-21  9:04     ` featurep Richard Stallman
2002-03-21 13:12       ` Kim F. Storm [this message]
2002-03-23  2:35         ` featurep Richard Stallman
2002-03-21 16:44       ` featurep Stefan Monnier
2002-03-21 19:47         ` featurep Kim F. Storm
2002-03-22  0:39           ` featurep Stefan Monnier
2002-03-22  9:14             ` featurep Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5xit7qgj3b.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).