From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman@gmail.com>
Subject: bug#3823: 23.1.50; skip-chars-forward does not move after forward-comment
Date: Fri, 05 Mar 2010 13:47:49 -0500 [thread overview]
Message-ID: <jwvlje64ni5.fsf-monnier+gnus-read-ephemeral-bug@gnu.org> (raw)
In-Reply-To: <e01d8a50907110834t76c22328g8f5070b4fe3cba32@mail.gmail.com> (Lennart Borgman's message of "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.
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)
prev parent reply other threads:[~2010-03-05 18:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 15:34 bug#3823: 23.1.50; skip-chars-forward does not move after forward-comment Lennart Borgman
2010-02-05 6:00 ` bug#3823: skip-chars-forward "[:space:]" does not work if used " Lenny Foner
2010-03-05 18:47 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvlje64ni5.fsf-monnier+gnus-read-ephemeral-bug@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=lennart.borgman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.