emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using syntax tables to parse buffer content


From: Eric Abrahamsen
Subject: Re: Using syntax tables to parse buffer content
Date: Wed, 26 May 2021 09:43:13 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]