I have no problem using
annotate =
#(define-music-function (parser location properties item)
(ly:context-mod? symbol-list-or-music?)
;; annotates a musical object for use with lilypond-doc
(display (ly:get-context-mods properties))
; Dummy coloring
#{
\once \tweak color #magenta #item
#}
)
\annotate \with { \accidentalStyle piano } c
with current master. To me it looks like you did not successfully "make
all" after checking out a different version of LilyPond, making your
Scheme files not correspond to your binaries.