Fixed a compilation warning and added a patched term.el for the CDPATH issue