GNU bug report logs - #3823
23.1.50; skip-chars-forward does not move after forward-comment

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 11 Jul 2009 15:40:06 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: bug-gnu-emacs <at> gnu.org (Emacs bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: emacs-bug-tracker <at> debbugs.gnu.org
Subject: bug#3823: marked as done (23.1.50; skip-chars-forward does not
 move after forward-comment)
Date: Fri, 05 Mar 2010 18:56:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 05 Mar 2010 13:47:49 -0500
with message-id <jwvlje64ni5.fsf-monnier+gnus-read-ephemeral-bug <at> gnu.org>
and subject line Re: 23.1.50; skip-chars-forward does not move after forward-comment
has caused the Emacs bug report #3823,
regarding 23.1.50; skip-chars-forward does not move after forward-comment
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs <at> gnu.org
immediately.)


-- 
3823: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3823
Emacs Bug Tracking System
Contact bug-gnu-emacs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; skip-chars-forward does not move after forward-comment
Date: Sat, 11 Jul 2009 17:34:44 +0200
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. However if you then do

   M-: (message "skipped %s " (skip-chars-forward "[:space:]"))

it will.


In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-06-30
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'

[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Subject: Re: 23.1.50; skip-chars-forward does not move after forward-comment
Date: Fri, 05 Mar 2010 13:47:49 -0500
> 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)


This bug report was last modified 15 years and 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.