compute default pattern the same M-x grep does
Merge branch 'master' into next