Xref: utzoo gnu.emacs:494 comp.emacs:5406 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!ncsuvx!mcnc!rti!xyzzy!godel!biesack From: biesack@godel.dg.com (Dave Biesack) Newsgroups: gnu.emacs,comp.emacs Subject: Re: Mode line problem Keywords: emacs Message-ID: <3519@xyzzy.UUCP> Date: 20 Feb 89 20:04:58 GMT References: <341@zeus.hf.intel.com> Sender: usenet@xyzzy.UUCP Reply-To: biesack@godel.UUCP (Dave Biesack) Organization: Data General Corporation, Research Triangle Park, NC. Lines: 52 In article <341@zeus.hf.intel.com> cfj@zeus.hf.intel.com (cfj) writes: > > I'm running GNU emacs 18.51 and have a stupid annoying problem which I > haven't been able to figure out by scanning the sources. When emacs comes > up it prints the mode line is standout mode (reverse video on a wyse 50) > and when I exit emacs, it does not turn off the standout mode. All > subsequent lines to the terminal are also in reverse video until I > manually turn it off. I'm running System V release 3.2 on a 386. Could > someone give me a hint on where in either the C or mocklisp source > I need to modify so that emacs does this correctly. It also does it > when I do an escape to csh. > I had similar problems running Emacs on a vt200 emulation terminal. You have two options (that I can think of right now): 1) define `kill-emacs-hook' and `suspend-resume-hook' which are called from suspend-emacs/kill-emacs. You will probably have to put a "wrapper" around kill-emacs to add a kill-emacs-hook for 18.51; it is there in 18.52 (although the doc does not say so). Do something like: (defvar old-kill-emacs (symbol-function 'kill-emacs)) (defun kill-emacs (arg) "Exit the Emacs job and kill it. ARG means no query. If emacs is running noninteractively and ARG is an integer, return ARG as the exit program code. before exitting, if kill-emacs-hook is bound, it is called with run-hooks." (interactive "P") (and (boundp 'kill-emacs-hook) (run-hooks 'kill-emacs-hook)) (funcall old-kill-emacs arg)) Your hook function can use send-string-to-terminal on the wyse-50 to clear the screen and/or turn off inverse video. You can probably improve this so that if the hook function(s) return non-nil, emacs is not killed (analogous to how suspend-emacs runs its hooks) 2) put (setq mode-line-inverse-video nil) in your .emacs file. I do this because I don't like the inverse video to begin with. > Thanks, > > Charles Johnson > Intel Corp. > Hillsboro, OR > cfj@cfj.hf.intel.com > djb David J. Biesack Data General {seismo, ...}!mcnc!rti!dg-rtp!biesack Research Triangle Park, NC biesack@dg-rtp.dg.com (919) 248-5989