From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: c-forward-sws: Is the code right? Date: Wed, 28 Mar 2018 19:05:18 +0000 Message-ID: <20180328190518.GA6592@ACM> References: <20180327164156.GA4105@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1522263999 27455 195.159.176.226 (28 Mar 2018 19:06:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2018 19:06:39 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Emacs developers To: zhang cc Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 28 21:06:35 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1GP5-00071J-8p for ged-emacs-devel@m.gmane.org; Wed, 28 Mar 2018 21:06:35 +0200 Original-Received: from localhost ([::1]:40651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1GR7-0004yJ-6K for ged-emacs-devel@m.gmane.org; Wed, 28 Mar 2018 15:08:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1GNk-0003dz-QB for emacs-devel@gnu.org; Wed, 28 Mar 2018 15:05:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1GNe-0000il-46 for emacs-devel@gnu.org; Wed, 28 Mar 2018 15:05:11 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:24197 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1f1GNd-0000hv-PX for emacs-devel@gnu.org; Wed, 28 Mar 2018 15:05:06 -0400 Original-Received: (qmail 61538 invoked by uid 3782); 28 Mar 2018 19:05:02 -0000 Original-Received: from acm.muc.de (p5B1475D2.dip0.t-ipconnect.de [91.20.117.210]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Mar 2018 21:05:02 +0200 Original-Received: (qmail 18439 invoked by uid 1000); 28 Mar 2018 19:05:18 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224125 Archived-At: Hello, Zhang. On Wed, Mar 28, 2018 at 01:35:55 +0000, zhang cc wrote: >> The intention is that "\\<\\>" will never match at all, hence that >> match-end will never be executed. "\\<" means "beginning of word" and >> "\\>" means "end of word". Could there be something in your environment >> whereby an end of word might be at the same position as the beginning of >> a word? If this is the case, then I will need to come up with an actual >> regexp which can never match anything. > It matchs when cursor is between a Chinese char and an ASCII char like “你hao”( cursor before ‘h’). I've committed a fix to master which should fix this bug. Basically, instead of "\\<\\>" CC Mode now uses Stefan's suggestion of "a\\`". Unfortunately, it is too late to get this bug fix into Emacs 26.1. If you are using any version but master, please tell me, and I will send you a patch to fix the bug in your copy of that version. Thanks for taking the trouble to report this bug. -- Alan Mackenzie (Nuremberg, Germany).