Re: name of the current mode?

Subject: Re: name of the current mode?
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: Wed, 18 Nov 1998 16:09:51 -0500
/ Stefan Mintert <mintert@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> was heard to say:
| Hi
| 
| How can I query the name of the current mode? 

I don't think you can.  But an element rule can only be in one mode,
so I imagine you're asking because you have a function that can be
called from any of several modes.  In that case, you could add the
mode info as a parameter to the function:

(define (foo calling-mode)
  (if (equal? calling-mode 'foo)
  ...))

(mode foo
  ...
  (foo 'foo))

(mode bar
  ...
  (foo 'bar))

(mode baz 
  ... 
  (foo 'bar)) ;; hey, you can lie if you want to ;-)



 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread