[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Skipping a generic comment backwards
From: |
martin rudalics |
Subject: |
Re: Skipping a generic comment backwards |
Date: |
Mon, 01 May 2006 10:42:42 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> BTW, your tiny contributions are beginning to accumulate, so you should
> seriously consider signing some paperwork, otherwise we soon won't be able
> to accept your patches any more.
Thanks for asking. I signed them a couple of months ago.
There's yet another bug in forward-comment: When a generic comment is at
the beginning of a buffer I can't skip it backwards as `forward_comment'
checks whether `from' equals `stop' _before_ investigating whether the
character at `from' is a comment fence.
The attached patch should fix this by inverting the order of these
tests.
martin, who regrets the inconvenience
2006-05-01 Martin Rudalics <address@hidden>
* syntax.c (Fforward_comment): Detect generic comment at beginning of
buffer when moving backwards.
*** syntax.c Mon May 1 10:08:58 2006
--- syntax.c Mon May 1 10:13:46 2006
***************
*** 2123,2130 ****
while (1)
{
DEC_BOTH (from, from_byte);
- if (from == stop)
- break;
UPDATE_SYNTAX_TABLE_BACKWARD (from);
c = FETCH_CHAR (from_byte);
if (SYNTAX (c) == Scomment_fence
--- 2123,2128 ----
***************
*** 2133,2138 ****
--- 2131,2138 ----
found = 1;
break;
}
+ else if (from == stop)
+ break;
}
if (found == 0)
{