From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: C++ mode and c-beginning-of-current-token Date: Wed, 16 May 2007 14:21:46 +0200 Message-ID: <464AF75A.1060704@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1179318284 32263 80.91.229.12 (16 May 2007 12:24:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 May 2007 12:24:44 +0000 (UTC) Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Herbert Euler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 16 14:24:43 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HoIYY-0007A2-Lj for ged-emacs-devel@m.gmane.org; Wed, 16 May 2007 14:24:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoIgX-0005Pr-8D for ged-emacs-devel@m.gmane.org; Wed, 16 May 2007 08:32:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoIgS-0005PL-NO for emacs-devel@gnu.org; Wed, 16 May 2007 08:32:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoIgR-0005Nl-1r for emacs-devel@gnu.org; Wed, 16 May 2007 08:32:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoIgQ-0005Nc-Pr for emacs-devel@gnu.org; Wed, 16 May 2007 08:32:46 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HoIYR-00076n-Bb for emacs-devel@gnu.org; Wed, 16 May 2007 08:24:31 -0400 Original-Received: (qmail invoked by alias); 16 May 2007 12:24:29 -0000 Original-Received: from N866P000.adsl.highway.telekom.at (EHLO [62.47.52.32]) [62.47.52.32] by mail.gmx.net (mp056) with SMTP; 16 May 2007 14:24:29 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+sjocCwEms/tCaKRzEHv1OKHF3Vp/SCB9FSEQ/L7 j18ygulReu9aKL User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:71160 Archived-At: > 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.