home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / lisp / mcl / 1097 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.3 KB  |  33 lines

  1. Path: sparky!uunet!olivea!apple!cambridge.apple.com!djskrien@COLBY.EDU
  2. From: djskrien@COLBY.EDU (Dale Skrien)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: toplevel-loop example
  5. Message-ID: <9207291921.AA07268@host4.COLBY.EDU>
  6. Date: 29 Jul 92 15:23:41 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 21
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10. Original-To: info-mcl@cambridge.apple.com
  11.  
  12. On page 654 in the MCL 2.0 final manual, I am told that you want your
  13. toplevel function to catch aborts if you don't want the listener to appear
  14. with an error message.  Then the manual gives an example that shows what
  15. goes wrong if you don't catch aborts:
  16. ? (defun new-top (&aux form)
  17.     (setq form (read))
  18.     (if (eq form 'done)
  19.         (%set-toplevel #'toplevel-loop)
  20.         (print (eval form))))
  21. ? (%set-toplevel #'new-top)
  22. ? (toplevel)
  23. At this point, if you type a command-period, you are supposed to get an
  24. error
  25. message saying that it can't throw to tag :abort.
  26.  
  27. However, when I tried this, and typed a command-period, nothing happened. 
  28. The new-top function just ignored the command-period.  Is the manual
  29. correct?  If so, why didn't I get the error message?
  30. Can someone give me a simple modification of the above example that catches
  31. aborts, brings up a message dialog with an error message, and then returns
  32. to the top-level function?
  33.