[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rlet keyword documentation

|     From: jbk@world.std.com (Jeffrey B Kane)
|     > I was wondering where the documentation was for all the possible keywords
|     > that can be used with rlet...    
|     Well at the risk of talking to myself, I found the answer and wanted to post it
|     in case it wasn't obvious to anyone else.  It turns our that there are two global
|     variables:
|                          *record-types* ...
| Michael Travers replies:
|   Try evaluating (ccl::load-all-records) before looking at this
|   variable, and you will find that there are many more possible record
|   types (436, in my world).  rlet and other forms that refer to record
|   types load these definitions automatically upon reference.

Here's another solution that will take much less time (4 seconds on my quadra)
because it won't actualy load all the record definitions:

(defun collect-all-record-types ()
    (let ((stream ccl::*records-index-stream*)
          (keyword (find-package :keyword)))
      (file-position stream (* 26 11))
      (loop for line = (read-line stream nil 'eof)
            until (eq line 'eof)
            collect (intern line keyword)
            do (read-line stream)
               (read-line stream)
               (read-line stream)))))

This will be integrated in the next version of my Extended-Apropos
where you will be able to ask questions like: What are all the records types
containing "WINDOW" in their name?


* Guillaume Cartier                 (514) 844-5294 (maison)         *
* L.A.C.I.M.                        (514) 987-4290 (bureau)         *
* Universite du Quebec a Montreal   (514) 987-8477 (telecopieur)    *
* Montreal, Quebec, Canada          cartier@math.uqam.ca (internet) *