Subject: bug#19455: Preliminary Patch

From: Jonathan H <[email-masked]>
Date: Sat, 20 Feb 2016 18:07:56 -0800

Hi all!

I've produced a patch that should fix this issue. As brought up in this
Emacs.SE answer <http://emacs.stackexchange.com/a/20406/2642>, the main
challenge was distinguishing the qualifiers from subshells. To do this, I
disallowed leading octothorpes wrapped in parentheses where the parentheses
are not separated from other tokens by metacharacters. For qualifiers
(which appear after a glob), the fix is trivial. For flags (which appear
before the glob), I have to rely on the fact that flags may not contain
parentheses themselves to avoid needing more sophisticated parsing.

I've tested this against a fairly comprehensive test file, which I've also
attached.

Thanks,
Jonathan