[Top][All Lists]

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

Re: C++ mode and c-beginning-of-current-token

From: martin rudalics
Subject: Re: C++ mode and c-beginning-of-current-token
Date: Wed, 16 May 2007 14:21:46 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> I'm not very sure about the meaning of (pos - 1), so instead of trying
> your proposal, I tried the following one:

To test you could try the following: Assign a syntax-table text-property
which differs from the standard syntax-table for the buffer to a few
characters and check whether `skip-syntax-backward' updates the
properties correctly when you are after the last character.  This should
guarantee that

>                p--, pos--, pos_byte--;
>                if (pos <= 1)
>                  break;
>                UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);

indeed updates the property for each and every character - in particular
the very first ("rightmost") one - skipped.  Better do this in an elisp
buffer to avoid that the major mode interferes with your settings.

reply via email to

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