From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: where does this belong?
Date: Wed, 27 Mar 2002 18:16:23 +0100 [thread overview]
Message-ID: <vafzo0udj88.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <m3u1r22dwl.fsf@multivac.cwru.edu> (prj@po.cwru.edu's message of "Wed, 27 Mar 2002 11:06:28 -0500")
prj@po.cwru.edu (Paul Jarc) writes:
> But I don't think I understand what the cl defstruct does, exactly.
> Can someone point me to an example use?
Here is what I use in Tramp:
(defstruct tramp-file-name multi-method method user host path)
After this, there is a constructor make-tramp-file-name which can be
called like this:
(make-tramp-file-name :multi-method x
:method y
:user u
:host h
:path p)
And there are functions tramp-file-name-multi-method through
tramp-file-name-path which get the corresponding items.
And then you can do
(setf (tramp-file-name-host x) "new-host")
to change the "host" component of a structure.
Does this help?
kai
--
Silence is foo!
next prev parent reply other threads:[~2002-03-27 17:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-27 0:18 Paul Jarc
2002-03-27 8:57 ` Kai Großjohann
2002-03-27 10:17 ` Simon Josefsson
2002-03-27 10:27 ` Daniel Pittman
2002-03-27 16:06 ` Paul Jarc
2002-03-27 17:16 ` Kai Großjohann [this message]
2002-03-27 19:13 ` Paul Jarc
2002-03-28 2:09 ` Daniel Pittman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vafzo0udj88.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de \
--to=kai.grossjohann@cs.uni-dortmund.de \
/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.
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 NNTP newsgroup(s).