added pac mode and some config in .emacs
added os check