Handle newer p4.el
Fix some warnings and figure out which internal annotate function to
call dynamically.