Thanks, I've got something that seems to work now. I read your message afterwards, so I'm afraid I think it does modify the glyph matrix and I've not used FRAME_TERMCAP_P. (I'm still not sure how the iterator, glyph matrix and write_glyphs relate. I would have thought if I've changed the glyph matrix I don't need to call write_glyphs but that doesn't seem to be the case. Also if I call write_glyphs with different values, these would get overwritten with those from the glyph matrix when an update is done.) Anyway I'd like to commit these changes now. I'm confident that the patch DTRT generally, although I'm sure there will be a few problems. It is perhaps timely with the imminent merge of multi-tty, and should be possible to extend to xterms by someone who understands the difference between mev and rmev. So could someone please try it out and say if it works for them? -- Nick http://www.inet.net.nz/~nickrob 1) CVS diff against repository at Wed May 16 10:26am (+12:00) (on the trunk). 2) To build you need libgpm and gpm.h. On Ubuntu these are in the packages gpm and gpm-dev respectively. 3) To enable do M-x t-mouse-mode (make sure that you've byte compiled the new t-mouse.el first).