home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / lisp / 3377 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.7 KB  |  51 lines

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