support type-at-point, stealing some elisp from david