Replace "CHAT_MSG_EMOTE" with "CHAT_MSG_TEXT_EMOTE", I believe that's what the event is called.
Edit: After taking a closer look at the code this seems to do the trick for me:
Code:
local function c(n) return n:gsub("%'%a*",""):gsub("%-%a*","") end
ChatFrame_AddMessageEventFilter("CHAT_MSG_TEXT_EMOTE",function(self,event,msg,send,lang,chan,target,...)
return false, c(msg), c(send), lang, chan, c(target), ...
end)
(Although it could turn out to be even more complicated, if there are hyphens or apostrophes in the actual emote text).