home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!math.fu-berlin.de!ira.uka.de!scsing.switch.ch!news.unige.ch!divsun!schneide
- From: schneide@divsun.unige.ch (SCHNEIDER daniel)
- Subject: Need help with macro writing
- Message-ID: <1993Jan26.215013.12107@news.unige.ch>
- Sender: usenet@news.unige.ch
- Organization: University of Geneva, Switzerland
- Date: Tue, 26 Jan 1993 21:50:13 GMT
- Lines: 40
-
- Hi folks,
-
- I am a bit stuck with macro writing. I'd like to translate this:
-
- (with-output-as-presentation1 (:stream t :type tt :object ttt) (print object) (bla bla))
-
- into this:
-
- (WITH-OUTPUT-AS-PRESENTATION (T TT TTT) (PRINT OBJECT) (BLA BLA))
-
- All I found was this:
-
- (defun find-key (key liste)
- (second (member key liste)))
-
- (defmacro with-output-as-presentation1 ((&rest arg) &rest body)
- (let ((stream1 (find-key ':stream arg))
- (type1 (find-key ':type arg))
- (object1 (find-key ':object arg)))
- `(with-output-as-presentation (,stream1 ,type1 ,object1)
- ,@body)))
-
- Looks very ugly to me. I couldn't figure out a way to use keywords in this macro.
- Could any helpful soul help me what to look for ? Thanks for any help/hints !!
-
-
-
- ---
- Daniel K.Schneider, TECFA (Educational Technologies and Learning)
- Faculte de Psychologie et des Sciences de l'Education, University of Geneva,
- 9 route de Drize, 1227 Carouge(Switzerland),
- Phone: (..41) 22 705 9694, Fax: (..41) 22 342 89 24
-
- Internet: schneide@divsun.unige.ch (and various national nets) | if reply
- X400: S=schneide;OU=divsun;O=unige;PRMD=switch;ADMD=arcom;C=ch | does not
- uucp: mcvax!cui!divsun.unige.ch!shneider | work, try
- BITNET: schneide@cgeuge51 | one of
- DECNET: UGUN2A::SCHNEIDE (local Swiss) | these
-
-
-