Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!sri-unix!phil@rice.ARPA From: phil@rice.ARPA Newsgroups: net.emacs Subject: Re: Executing a function when restarting Emacs. Message-ID: <12376@sri-arpa.UUCP> Date: Mon, 13-Aug-84 11:04:13 EDT Article-I.D.: sri-arpa.12376 Posted: Mon Aug 13 11:04:13 1984 Date-Received: Thu, 16-Aug-84 01:35:46 EDT Lines: 31 From: William LeFebvre> The pausing part is easy: simply write the Mlisp code and bind it to the > normal exiting or pausing keys. The restarting is a bit more difficult: when > you restart a paused emacs, all it does is redraw the screen and put the > cursor in the last used position. We would like to be able to execute a > function every time emacs is restarted. My feeling is that there should be a > variable (say "restart-function") that you could set to a string value, and > that every time Emacs is restarted, it would do an (execute-string > restart-function). Presumably, the function that does the pausing calls the builtin function "pause-emacs". This function pauses the emacs and returns when the emacs is restarted (or CONTinued). This means that the function that does stuff prior to pausing can also do stuff after the emacs is resumed. It would look something like this: (defun (better-pause-emacs ;;; do preliminary stuff here (pause-emacs) ;;; do cleanup stuff here ) ) So you see, there is no need for the "restart-function" stuff. William LeFebvre Department of Computer Science Rice University