Add .gitignore.
Refactor configuration for term.el.