add some customization on emacs editing behaviors
extract code that customize emacs editing behaviors