I'd like to move away from the explicit terminal-name checking, (I know we currently do it to detect, say, XT), but that may not be possible until we support terminfo properly, though, rather than termcap. I haven't had a chance to look this over closely.