This is the complete plugin code (with my modification) but I don't think that they are enought avoid problems with categories names containg spaces.
On row n. 220 find the code
bind $w.c.$categ_num <Button1-ButtonRelease> "bind .smile_selector <Leave> \"\";::bigsmileys::BigSmileysMenu \[winfo pointerx $w\] \[winfo pointery $w\] $text $categ $custom_emotions_categories($categ) $w [winfo width $w] [winfo height $w]"
and replace with
bind $w.c.$categ_num <Button1-ButtonRelease> "bind .smile_selector <Leave> \"\";::bigsmileys::BigSmileysMenu \[winfo pointerx $w\] \[winfo pointery $w\] \"$text\" \"$categ\" \"$custom_emotions_categories($categ)\" $w [winfo width $w] [winfo height $w]"
On row n. 466 find the code
bind $w <Leave> "::smiley::handleLeaveEvent $w $x_geo $y_geo"
and replace with
bind $w <Leave> "::smiley::handleLeaveEvent \"$w\" $x_geo $y_geo"
On row n. 478 find the code
bind $w.c <Leave> "::smiley::handleLeaveEvent $w $x_geo $y_geo;"
and replace with
bind $w.c <Leave> "::smiley::handleLeaveEvent \"$w\" $x_geo $y_geo"
On row n. 479 find the code
bind $w.c <Unmap> "bind $fatw <Leave> \"::smiley::handleLeaveEvent $fatw $fatx_geo $faty_geo\""
and replace with
bind $w.c <Unmap> "bind $fatw <Leave> \"::smiley::handleLeaveEvent \\\"$fatw\\\" $fatx_geo $faty_geo\""
On row n. 561 find the code
bind $w.c <Leave> "::smiley::handleLeaveEvent $w $x_geo $y_geo;"
and replace with
bind $w.c <Leave> "::smiley::handleLeaveEvent \"$w\" $x_geo $y_geo;"
On row n. 562 find the code
bind $w.c <Unmap> "bind $fatw <Leave> \"::smiley::handleLeaveEvent $fatw $fatx_geo $faty_geo\""
and replace with
bind $w.c <Unmap> "bind $fatw <Leave> \"::smiley::handleLeaveEvent \\\"$fatw\\\" $fatx_geo $faty_geo\""
On row n. 680 find the code
bind $w <Leave> "::smiley::handleLeaveEvent $w $x_geo $y_geo"
and replace with
bind $w <Leave> "::smiley::handleLeaveEvent \"$w\" $x_geo $y_geo"