Fixed use of '%' in replacement for Lua5.2 compatibility (#153, #156, #143).

Removed a fragment of auto-complete processing that is no longer needed
as its logic is covered by another part of the code.