set up kernel style in Emacs and fix emacs-nox bug