[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: |
Thu, 17 May 2007 16:45:13 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Also, it is important to update the syntax-table only after making sure that
the new position is valid. So I believe the patch below is what we want.
Stefan
--- orig/src/syntax.c
+++ mod/src/syntax.c
@@ -1691,10 +1691,10 @@
p = GPT_ADDR;
stop = endp;
}
+ UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
if (! fastmap[(int) SYNTAX (p[-1])])
break;
p--, pos--;
- UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
}
}
}
Indeed, though I'd prefer the attached one.
BTW, did you look at the backward-word problem I mentioned in my previous mail?
*** syntax.c Wed Jan 17 09:31:10 2007
--- syntax.c Thu May 17 15:23:24 2007
***************
*** 1669,1678 ****
p = GPT_ADDR;
stop = endp;
}
- if (! fastmap[(int) SYNTAX (p[-1])])
- break;
p--, pos--;
! UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
}
}
}
--- 1669,1681 ----
p = GPT_ADDR;
stop = endp;
}
p--, pos--;
! UPDATE_SYNTAX_TABLE_BACKWARD (pos);
! if (! fastmap[(int) SYNTAX (*p)])
! {
! p++, pos++;
! break;
! }
}
}
}
- Re: C++ mode and c-beginning-of-current-token, (continued)
- Re: C++ mode and c-beginning-of-current-token, Herbert Euler, 2007/05/15
- Re: C++ mode and c-beginning-of-current-token, Herbert Euler, 2007/05/16
- Re: C++ mode and c-beginning-of-current-token, Herbert Euler, 2007/05/16
- Re: C++ mode and c-beginning-of-current-token, Kenichi Handa, 2007/05/16
- Re: C++ mode and c-beginning-of-current-token, martin rudalics, 2007/05/17
- Re: C++ mode and c-beginning-of-current-token, Herbert Euler, 2007/05/17
- Re: C++ mode and c-beginning-of-current-token, martin rudalics, 2007/05/17
- Re: C++ mode and c-beginning-of-current-token, martin rudalics, 2007/05/17
- Re: C++ mode and c-beginning-of-current-token, Stefan Monnier, 2007/05/17
- Re: C++ mode and c-beginning-of-current-token,
martin rudalics <=
- Re: C++ mode and c-beginning-of-current-token, Richard Stallman, 2007/05/18
- Re: C++ mode and c-beginning-of-current-token, Herbert Euler, 2007/05/18
- Re: C++ mode and c-beginning-of-current-token, Richard Stallman, 2007/05/19
- Re: C++ mode and c-beginning-of-current-token, martin rudalics, 2007/05/19
- Re: C++ mode and c-beginning-of-current-token, Stefan Monnier, 2007/05/19
- Re: C++ mode and c-beginning-of-current-token, martin rudalics, 2007/05/19
- Re: C++ mode and c-beginning-of-current-token, Kenichi Handa, 2007/05/21
- Re: C++ mode and c-beginning-of-current-token, Stefan Monnier, 2007/05/21
- Re: C++ mode and c-beginning-of-current-token, Kenichi Handa, 2007/05/21
- Re: C++ mode and c-beginning-of-current-token, Stefan Monnier, 2007/05/22