>I would like to play with a termcap for a particular terminal. I
>don't want to have to edit /etc/termcap to do this. But it seems that
>Gnu Emacs (at least version 17) only looks at the TERM environment
>variable. Could it be altered so that it uses TERMCAP environment
>variable if it is present, and if not, then the TERM variable?
this isn't quite true. The logic is: check the TERMCAP environment
variable. If it is set and the value does not begin with a slash (/),
assume it is a TERMCAP entry and see if it matches what is set in the
TERM variable. If it is set and the name does begin with a slash, then
it is the name of the TERMCAP file.
My .login contains something like
echo -n "Terminal? "
fgrep "$term|" ~/.termcap >/dev/null
if ($status == 0) then
setenv TERMCAP ~/.termcap
setenv TERMCAP /etc/termcap
eval `tset -sQ`
which reads a line from stdin to get the terminal type, looks in my
personal termcap file (~/.termcap) for an entry with that name, sets
TERMCAP to point there if it finds it or to /etc/termcap if it
doesn't, then use tset to set the TERMCAP environment variable to the
actual entry for my terminal. This last step isn't strictly necessary,
but speeds up access tremendously.