GNU bug report logs - #19455
24.4; sh-mode highlighting breaks with ZSH glob modifiers

Previous Next

Package: emacs;

Reported by: Jonathan H <pythonnut <at> gmail.com>

Date: Sun, 28 Dec 2014 03:05:01 UTC

Severity: normal

Tags: fixed, patch

Found in versions 24.4, 25.1.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 19455 <at> debbugs.gnu.org (full text, mbox):

From: Jonathan H <pythonnut <at> gmail.com>
To: 19455 <at> debbugs.gnu.org
Subject: Preliminary Patch
Date: Sat, 20 Feb 2016 18:07:56 -0800
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
[0001-Highlight-zsh-glob-flags-and-qualifiers-in-sh-mode.patch (application/octet-stream, attachment)]
[sh_comment_tests.sh (application/x-sh, attachment)]

This bug report was last modified 6 years and 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.