emacs-devel
[Top][All Lists]
Advanced

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

Re: The symbol `@' and sexp scanning


From: Andreas Politz
Subject: Re: The symbol `@' and sexp scanning
Date: Thu, 13 Oct 2016 12:19:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Michael Heerdegen <address@hidden> writes:

> FWIW, I can't make much sense out of this description (but the first
> sentence).  Nearly anything in an Elisp buffer is inside an
> expression.

I think `expression' can be read as `symbol' in this context.
E.g. calling forward-sexp at the beginning of any of the following
expressions results in the same error.

)
')
'')
'@)
@@)
'@'@')

This is because the sexp scanner treats ' and @ (due to the p flag) in
this context as whitespace, i.e. ignores it (Anyway, that's how I
understand it.).  OTOH the following all `work', because there is
something to scan over, before reaching the closing paren.

x)
' x)
@ x)


> [...] evaluating something like that results in an error saying that
> the symbol `@' is unbound, so it doesn't seem to be treated as
> whitespace, but as an expression.

But the way expressions are read and evaluated has nothing to do with
how the function scan-sexp operates.

> Ok, but I guess it's not syntax classification that is problematic but
> how it is treated in the case of the bug.

AFAIK it operates as intended.  As to why @ is treated as a prefix
character in an Elisp buffer I don't know.

-ap



reply via email to

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