all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Hansen <david.hansen@gmx.net>
Subject: Re: newline doesn't have whitespace syntax?
Date: Fri, 12 May 2006 17:13:34 +0200	[thread overview]
Message-ID: <874pzv9syp.fsf@robotron.kosmorama> (raw)
In-Reply-To: 7f270cb80605120722i7fb1ca0ap6472229c335c8a@mail.gmail.com

On Fri, 12 May 2006 10:22:37 -0400 John Conrad wrote:

> When I read this in the elisp manual:
>
> "Space, tab, newline and formfeed are classified as whitespace in
> almost all major modes."
> (35.2.1 Table of Syntax Classes)
>  
> I assumed that this re-search-forward expression would match the line
> following it, but no dice.
>
> (re-search-forward "abcd[[:space:]]")
> abcd
>
> I've tried several different modes, including fundamental mode. Am I
> missing something?

Sounds like an Emacs bug to me "\\s " is working (in
fundamental-mode).  Anyway newline isn't whitespace in
"most" modes.  In quite a lot of languages a newline ends a
comment.  To make your regexp reliable i would use something
like "abcd\\(\\s \\|$\\)" (note that this will match "abcd"
at the end of the buffer too w/o a final newline).

BTW:  M-: (syntax-after (point)) RET may be useful.

David

  reply	other threads:[~2006-05-12 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-12 14:22 newline doesn't have whitespace syntax? John Conrad
2006-05-12 15:13 ` David Hansen [this message]
2006-05-12 17:13   ` Kevin Rodgers

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=874pzv9syp.fsf@robotron.kosmorama \
    --to=david.hansen@gmx.net \
    /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.