Use defadvice instead of flet

This is my suggestion to do #1066 and #1117 correctly.

I think this works but I cannot be 100% sure since I have another problem with el-get and the version of Emacs I am using.