From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3823: 23.1.50; skip-chars-forward does not move after forward-comment Date: Fri, 05 Mar 2010 13:47:49 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1267817074 29595 80.91.229.12 (5 Mar 2010 19:24:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 5 Mar 2010 19:24:34 +0000 (UTC) To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 05 20:24:29 2010 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nnd8P-0007Lh-7o for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Mar 2010 20:24:29 +0100 Original-Received: from localhost ([127.0.0.1]:35073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nnd8O-0005qI-M9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Mar 2010 14:24:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nnd8E-0005jO-UY for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2010 14:24:18 -0500 Original-Received: from [140.186.70.92] (port=37630 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nnd8D-0005hz-CB for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2010 14:24:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nnd8A-0000Az-VQ for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2010 14:24:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54240) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nnd8A-0000Au-Rt for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2010 14:24:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nncgs-0006Fc-05 for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2010 13:56:02 -0500 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2010 18:56:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org Mail-Followup-To: 3823@debbugs.gnu.org, Stefan Monnier X-Emacs-PR-Message: cc-closed 3823 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3823-done@debbugs.gnu.org id=D3823.126781531924019 (code D ref 3823); Fri, 05 Mar 2010 18:56:01 +0000 Original-Received: (at 3823-done) by debbugs.gnu.org; 5 Mar 2010 18:55:19 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NncgB-0006FM-7F for submit@debbugs.gnu.org; Fri, 05 Mar 2010 13:55:19 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NncZ0-0006BX-VL for 3823-done@debbugs.gnu.org; Fri, 05 Mar 2010 13:47:55 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAK/gkEtMCo4j/2dsb2JhbACbR3S4CoR3BIMXh3Q X-IronPort-AV: E=Sophos;i="4.49,588,1262581200"; d="scan'208";a="57603034" Original-Received: from 76-10-142-35.dsl.teksavvy.com (HELO ceviche.home) ([76.10.142.35]) by ironport2-out.pppoe.ca with ESMTP; 05 Mar 2010 13:47:50 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id C7BE4B44D4; Fri, 5 Mar 2010 13:47:49 -0500 (EST) In-Reply-To: (Lennart Borgman's message of "Sat, 11 Jul 2009 17:34:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-Mailman-Approved-At: Fri, 05 Mar 2010 13:55:17 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 05 Mar 2010 13:56:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35432 Archived-At: > Start from "emacs -Q" and in the scratch buffer enter some empty lines > at the top and some lines of code there so it looks like > > (message "i am at the top") > > ;; This buffer is for notes... > ;; If you want to create a file... > > Place point at the beginning of the line ";; If you ..." and do > > M-: (progn (forward-comment (- 100)) (message "skipped %s " > (skip-chars-forward "[:space:]"))) > > skip-forward will not move forward above. Yes, and that's what we want. > However if you then do > M-: (message "skipped %s " (skip-chars-forward "[:space:]")) > it will. Oops, indeed, it does. The patch below fixes it, Stefan PS: The reason [:space:] doesn't skip forward is because in emacs-lisp-mode, like in many other modes, LF has syntax "comment-end" rather than "whitespace". It's usually not a good idea to use the "\\s-" regexp or the [:space:] char-class for that reason: better use something like [ \t\n\r]. === modified file 'src/syntax.c' --- src/syntax.c 2010-01-13 08:35:10 +0000 +++ src/syntax.c 2010-03-05 18:39:56 +0000 @@ -1747,6 +1747,7 @@ } immediate_quit = 1; + SETUP_SYNTAX_TABLE (BEGV, 0); if (forwardp) { if (multibyte)