Re: Using "internal" macros of a CL implementation
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Sun, 29 Oct 2006 15:52:41 -0500
Victor Kryukov wrote:
Hello group,
I've the following question: I want to define macro case-string, which
behaves exactly like case, only using string-equal instead of eql.
I've looked up definition of case in SBCL[*], and realized that my
task is as simple as
(defmacro case-string (keyform &body cases)
(case-body 'case keyform cases t 'string-equal nil nil nil))
My problem is with case-body - it's not imported by default, and I
don't know how to import it (I guess that my problem is with
understanding how packages work, strictly speaking).
So specify (whatever-cl-package::case-body....)
I also don't know
how to make my definition of case-string portable - I guess not all CL
implementations may use case-body internally.
If you want portable, expand each case into a cond clause.
kt
--
Cells: http://common-lisp.net/project/cells/
"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
.
- References:
- Using "internal" macros of a CL implementation
- From: Victor Kryukov
- Using "internal" macros of a CL implementation
- Prev by Date: Re: Using (CASE ...) with strings?
- Next by Date: Re: [OT] How do you read usenet news (c.l.l of course!)
- Previous by thread: Re: Using "internal" macros of a CL implementation
- Next by thread: Re: Using "internal" macros of a CL implementation
- Index(es):
Relevant Pages
|