[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: skip-chars-forward error "Invalid ISO C character class"

From: Kim F. Storm
Subject: Re: skip-chars-forward error "Invalid ISO C character class"
Date: 15 Jun 2004 11:45:19 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Robert J. Chassell" <address@hidden> writes:

>   (skip-chars-forward "[:.,\t\n ]+")
> When the line is in the *scratch* buffer, this error message will be
> generated:
> Debugger entered--Lisp error: (error "Invalid ISO C character class")

Well, unless the author actually intended to also match the characters []+
the proper form of the above call is:

   (skip-chars-forward ":.,\t\n ")

so I guess it's a bug in the code (the arg is a string not a regexp).

But the reason the error only reveals is head now is because RMS has
installed a patch to allow character classes to be specified, e.g.
   (skip-chars-forward "[:alpha:]")

The implementation is a bit brute force though, so it triggers errors
for things which clearly are not intended to be interpreted as a
character class.  E.g.

        (skip-chars-forward "[:]")

I have installed a change which checks that [:class:] has the proper
format before interpretion it as a class spec.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]