From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: C++ mode and c-beginning-of-current-token Date: Sat, 12 May 2007 18:39:12 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1178966369 29168 80.91.229.12 (12 May 2007 10:39:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 May 2007 10:39:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: acm@muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 12 12:39:28 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 1Hmp0W-0008OM-VJ for ged-emacs-devel@m.gmane.org; Sat, 12 May 2007 12:39:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hmp82-0001yy-W9 for ged-emacs-devel@m.gmane.org; Sat, 12 May 2007 06:47:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hmp7z-0001yf-Pv for emacs-devel@gnu.org; Sat, 12 May 2007 06:47:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hmp7x-0001vc-P3 for emacs-devel@gnu.org; Sat, 12 May 2007 06:47:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hmp7x-0001vN-L8 for emacs-devel@gnu.org; Sat, 12 May 2007 06:47:05 -0400 Original-Received: from bay0-omc3-s16.bay0.hotmail.com ([65.54.246.216]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hmp0Q-0004xk-EI for emacs-devel@gnu.org; Sat, 12 May 2007 06:39:18 -0400 Original-Received: from hotmail.com ([65.55.154.84]) by bay0-omc3-s16.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 12 May 2007 03:39:17 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 12 May 2007 03:39:17 -0700 Original-Received: from 65.55.154.123 by by143fd.bay143.hotmail.msn.com with HTTP; Sat, 12 May 2007 10:39:12 GMT X-Originating-IP: [221.223.220.175] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com X-OriginalArrivalTime: 12 May 2007 10:39:17.0631 (UTC) FILETIME=[CABB40F0:01C79481] X-detected-kernel: Windows 2000 SP4, XP SP1+ 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:70886 Archived-At: In the newest unicode 2 branch, `parse-sexp-lookup-properties' is default to `t' in C++ mode but not in C mode. I don't have the Emacs 22 trunk, and so don't know the case in that trunk. But if this variable is set to t by default, there will be a bug in c++-mode: 1. Visit an empty, new C++ file. 2. Try to insert the following line, at the beginning of the buffer: #include Well, an error will be signaled when typing the second character, "i", says "Point before start of properties". This error happens in the function `c-beginning-of-current-token', when invoking `skip-syntax-backward': (defun c-beginning-of-current-token (&optional back-limit) ;; Move to the beginning of the current token. Do not move if not ;; in the middle of one. BACK-LIMIT may be used to bound the ;; backward search; if given it's assumed to be at the boundary ;; between two tokens. Return non-nil if the point is move, nil ;; otherwise. ;; ;; This function might do hidden buffer changes. (let ((start (point))) (if (looking-at "\\w\\|\\s_") (skip-syntax-backward "w_" back-limit) (when (< (skip-syntax-backward ".()" back-limit) 0) ;; ... ... If `parse-sexp-lookup-properties' is t, `skip-syntax-backward' would not return -1, but signaling an error in some cases. Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/