replacing usage of characterp with integerp (which should work w/Emacs22)