From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Using syntax tables to parse buffer content
Date: Wed, 26 May 2021 09:43:13 -0700 [thread overview]
Message-ID: <87sg29mony.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <jwvzgwjvo5s.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 24 May 2021 17:07:04 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> For example, in a text-mode test buffer, I add the "/" syntax class to
>> ?*, then put that character before a space character, thinking it might
>> negate the space's whitespace class. That doesn't happen, though, as
>> (skip-syntax-forward "^ ") still stops at the space.
>
> skip-syntax-forward only looks at the actual syntax, so it doesn't pay
> attention to anything before/after.
Aha! Maybe I can suggest some documentation patches here.
> The "/" class is effective when you consider operations like
> `forward-sexp`, which might consider `foo\ bar` as a single "symbol"
> rather than two.
So would you suggest that I slightly abuse the concept of sexps here?
Maybe start with a completely blank syntax table, and give "=:;,"
punctuation class, and then `forward-sexp' to eat up chunks of text...
next prev parent reply other threads:[~2021-05-26 16:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 20:21 Using syntax tables to parse buffer content Eric Abrahamsen
2021-05-24 21:07 ` Stefan Monnier
2021-05-26 16:43 ` Eric Abrahamsen [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-05-18 21:02 Eric Abrahamsen
2021-05-18 22:35 ` Jean Louis
2021-05-18 22:53 ` Eric Abrahamsen
2021-05-18 23:21 ` Jean Louis
2021-05-19 0:26 ` Eric Abrahamsen
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=87sg29mony.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.