GNU bug report logs - #16046
Bug with Regexp Containing only a Character Class with a Caret

Previous Next

Package: emacs;

Reported by: Cameron Desautels <camdez <at> gmail.com>

Date: Wed, 4 Dec 2013 10:06:03 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 16046-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Cameron Desautels <camdez <at> gmail.com>
Cc: 16046-done <at> debbugs.gnu.org
Subject: Re: bug#16046: Bug with Regexp Containing only a Character Class with
 a Caret (PATCH)
Date: Thu, 05 Dec 2013 15:26:38 -0500
> After further experimentation, I suspect that "[^]" is simply not
> a valid regular expression.

Indeed, according to the documentation, for ^ to be treated as itself,
it needs to be "not the first char", but since we have nothing else to
put there, we're kind of screwed.

> This suggests that the broken behavior is within
> `regexp-opt-charset`.  I've attached a patch for that function.

Thank you for tracking down the problem and providing a fix.  I just
installed it in trunk, closing,


        Stefan




This bug report was last modified 11 years and 221 days ago.

Previous Next


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