home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / lisp / mcl / 1663 < prev    next >
Encoding:
Text File  |  1992-11-23  |  2.3 KB  |  58 lines

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!cartier@math.uqam.ca
  2. From: cartier@math.uqam.ca (Guillaume Cartier)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re: rlet keyword documentation
  5. Message-ID: <9211231606.AA17171@mipsmath.math.uqam.ca>
  6. Date: 23 Nov 92 16:06:30 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 47
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11. <---
  12. |     From: jbk@world.std.com (Jeffrey B Kane)
  13. |     
  14. |     > I was wondering where the documentation was for all the possible keywords
  15. |     > that can be used with rlet...    
  16. |     Well at the risk of talking to myself, I found the answer and wanted to post it
  17. |     in case it wasn't obvious to anyone else.  It turns our that there are two global
  18. |     variables:
  19. |     
  20. |                          *record-types* ...
  21. | Michael Travers replies:
  22. |
  23. |   Try evaluating (ccl::load-all-records) before looking at this
  24. |   variable, and you will find that there are many more possible record
  25. |   types (436, in my world).  rlet and other forms that refer to record
  26. |   types load these definitions automatically upon reference.
  27. --->
  28.  
  29. Here's another solution that will take much less time (4 seconds on my quadra)
  30. because it won't actualy load all the record definitions:
  31.  
  32. (defun collect-all-record-types ()
  33.   (with-standard-io-syntax
  34.     (let ((stream ccl::*records-index-stream*)
  35.           (keyword (find-package :keyword)))
  36.       (file-position stream (* 26 11))
  37.       (loop for line = (read-line stream nil 'eof)
  38.             until (eq line 'eof)
  39.             collect (intern line keyword)
  40.             do (read-line stream)
  41.                (read-line stream)
  42.                (read-line stream)))))
  43.  
  44. This will be integrated in the next version of my Extended-Apropos
  45. where you will be able to ask questions like: What are all the records types
  46. containing "WINDOW" in their name?
  47.  
  48. Regards,
  49. Guillaume.
  50.  
  51. *********************************************************************
  52. * Guillaume Cartier                 (514) 844-5294 (maison)         *
  53. * L.A.C.I.M.                        (514) 987-4290 (bureau)         *
  54. * Universite du Quebec a Montreal   (514) 987-8477 (telecopieur)    *
  55. * Montreal, Quebec, Canada          cartier@math.uqam.ca (internet) *
  56. *********************************************************************
  57.