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