add emacs function mode and support global tags