Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!mhres!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.emacs Subject: Re: 2) Is there something like ``emacs-exit-hooks''? Message-ID: Date: 14 Dec 89 19:23:51 GMT References: <318@gtenmc.UUCP> Sender: jv@mhres.mh.nl Organization: Multihouse Gouda, the Netherlands Lines: 27 In-reply-to: fst@gtenmc.UUCP's message of 13 Dec 89 08:48:52 GMT In article <318@gtenmc.UUCP> fst@gtenmc.UUCP (Fariborz "Skip" Tavakkolian) writes: > 2) I've setup my terminal config. file to initialize the screen labels for > the function keys to have something descriptive. I would like to reset > these labels to what they were before, or cleaned up when I exit emacs. > How dow I do that? (I know how to do it to the terminal, question is > how to set up my .emacs to do it to the terminal at the right time ) I use the following piece of code to perform something alike: (defvar kill-emacs-hooks nil "Hook functions to be executed upon kill-emacs.") (setq kill-emacs-hook '(lambda nil (run-hooks 'kill-emacs-hooks))) And then (setq kill-emacs-hooks (cons 'my-terminal-reset kill-emacs-hooks)) Hope it helps. Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62944/62500 ------------------------ "Arms are made for hugging" -------------------------