(when (regexp-match? #rx"xterm" (getenv "TERM")) (dynamic-require '(lib "rep.ss" "readline") #f))
I posted this earlier, but forgot to append the "rc" to the file name.