>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Jean-Marc Lasgouttes wrote:
>> Another option that you could explore (in order to avoid to push
>> tokens), is to use LyXLex::eatLine() instead of
>> LyXLex::nextToken(). This uses the remainder of the line as next
>> token. I am not sure whether it will give you correctly an empty
>> token when the argument to \paperpackage is missing, but it is
>> probably worth trying.

Georg> It does give an empty token.

Good.
 
Georg> This is almost working, but the token needs still to be pushed
Georg> if there is an argument, because getString() removes it. I
Georg> think the attached patch is finally safe. OK to apply it?

getString does not remove anything. It happens that findToken does a
next(), which is a rather stupid thing to do, and indeed you need to
use pushToken. I guess that we should have a getToken method that
works like findToken but without a next, but this is overkeill for
1.3.x.

You can commit the version you prefer.

JMarc

Reply via email to