tweaks to support Emacs 22