From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: c-mode syntax strings and regexp word boundaries Date: Fri, 06 Sep 2013 10:07:24 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378476471 32227 80.91.229.3 (6 Sep 2013 14:07:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Sep 2013 14:07:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jon Dufresne Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 06 16:07:52 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VHwhS-0006ap-V5 for ged-emacs-devel@m.gmane.org; Fri, 06 Sep 2013 16:07:51 +0200 Original-Received: from localhost ([::1]:37865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHwhS-0007AM-GB for ged-emacs-devel@m.gmane.org; Fri, 06 Sep 2013 10:07:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHwhB-0006xL-3E for emacs-devel@gnu.org; Fri, 06 Sep 2013 10:07:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHwh3-0006kI-RB for emacs-devel@gnu.org; Fri, 06 Sep 2013 10:07:33 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:62441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHwh3-0006kA-Mu for emacs-devel@gnu.org; Fri, 06 Sep 2013 10:07:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26657680" Original-Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Sep 2013 10:04:16 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A913D6329D; Fri, 6 Sep 2013 10:07:24 -0400 (EDT) In-Reply-To: (Jon Dufresne's message of "Thu, 5 Sep 2013 22:14:16 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163224 Archived-At: > (re-search-forward "^END\\b") > (put-text-property (1- (point)) (point) > 'syntax-table (string-to-syntax "|")) This changes the syntax of this "D" from "w" to "|". > (goto-char (point-min)) > (message "Search forward second time") > (re-search-forward "^END\\b")) The char before ";" is "D" which is not a word char any more, and the ";" is not a word char either, so the point between the two is not a word boundary any more. Stefan