Switched function used to calculate screen width in emacs.