help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: SMIE questions


From: Thibaut Verron
Subject: Re: SMIE questions
Date: Thu, 23 Jul 2020 13:52:22 +0200

Hi,


> - How are the calls to the rules function determined? For example, if I
> indent before the quote (point 42), the function is called 2 or 3 times:
> once with :list-intro, one with :elem args, and once (if the previous was
> nil) with :elem basic (incidentally, there seems to be a small mistake in
> the documentation there).
>

Okay I think I have figured that one out: if string quotes are part of the
syntax, the lexer needs to return them as tokens.
Now, if I do this, I can control the indentation of the docstring as I
would expect, but I cannot indent the next line, it results in

Error: (wrong-type-argument number-or-marker-p noindent)


If I replace the quotes by regular parentheses in the language and the
grammar and the lexer, it seems to work fine. But if I give a syntax-class
of string-fence to those, the same error comes again.

It seems that the trouble is that smie somehow tries to indent in the
middle of the docstring, and for that calls smie-indent-string which
returns noindent.

What I don't know is if it is because my grammar is wrong, or if I should
report it as a bug in emacs.

Thanks, best regards!
Thibaut


reply via email to

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