[COMMIT] Merge regexp-opt.el with GNU, fixing bugs and adding improvements