Fix bugs and factorize code in the autowrap script
Fix bugs and factorize code in the autowrap script

Somasis/kakoune,jjthrash/kakoune,Somasis/kakoune,alexherbo2/kakoune,occivink/kakoune,jkonecny12/kakoune,flavius/kakoune,lenormf/kakoune,lenormf/kakoune,alexherbo2/kakoune,jjthrash/kakoune,alexherbo2/kakoune,alexherbo2/kakoune,lenormf/kakoune,ekie/kakoune,lenormf/kakoune,jjthrash/kakoune,jkonecny12/kakoune,mawww/kakoune,flavius/kakoune,jkonecny12/kakoune,occivink/kakoune,casimir/kakoune,flavius/kakoune,ekie/kakoune,danr/kakoune,casimir/kakoune,flavius/kakoune,occivink/kakoune,danr/kakoune,casimir/kakoune,danr/kakoune,Somasis/kakoune,occivink/kakoune,mawww/kakoune,danr/kakoune,mawww/kakoune,ekie/kakoune,jkonecny12/kakoune,mawww/kakoune,jjthrash/kakoune,casimir/kakoune,ekie/kakoune,Somasis/kakoune