From ... From: Erik Naggum Subject: Re: Q: "on exit" processing Date: 2000/11/30 Message-ID: <3184585037217223@naggum.net>#1/1 X-Deja-AN: 699544468 References: <900h6f$qfc$1@nnrp1.deja.com> <9036eb$vnf$1@nnrp1.deja.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 975597421 28940 195.0.192.66 (30 Nov 2000 15:17:01 GMT) Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 30 Nov 2000 15:17:01 GMT Newsgroups: comp.lang.lisp * glauber | How do you do that? For example, in CLISP, the exit function is | (lisp:exit). How can i redefine (lisp:exit) so that it does something | and then calls the original definition? I don't know about CLISP, but in several other Lisps, you can add _advice_ to functions. Even Emacs Lisp has such a feature. I frankly don't see why unwind-protect around the function that is supposed to be run before exiting can't take care of these things. This whole thing feels like a stop-gap solution to a more fundamental problem. Is the real problem that CLISP terminates uncontrollably? If so, that should be a high-priority bug report and serious attention to a fix, not some user somewhere crying over crashing software in the sadly misguided belief that he just has to live with it. Again if so, users should stop accepting that software crashes, like they would never accept to come home to a house in rubbles one afternoon and be explained that random crashes are to expected with modern buildings. If the problem is not that CLISP terminates uncontrollably, there must be a reason why the function that runs this program cannot take care of its cleanup stuff itself. #:Erik -- Solution to U.S. Presidential Election Crisis 2000: Let Texas secede from the Union and elect George W. Bush their very first President. All parties, states would rejoice.