[Top][All Lists]

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

Re: SMIE documentation

From: Johan Bockgård
Subject: Re: SMIE documentation
Date: Sun, 13 May 2012 13:51:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> First, here's a patch to make smie-next-sexp correctly return (t POS
>> TOKEN) when bumping into a closing thingy in the forward direction.
>> --- a/lisp/emacs-lisp/smie.el
>> +++ b/lisp/emacs-lisp/smie.el
>> @@ -653,7 +653,8 @@ Possible return values:
>>                  (if (and halfsexp (numberp (funcall op-forw toklevels)))
>>                      (push toklevels levels)
>>                    (throw 'return
>> -                         (prog1 (list (or (car toklevels) t) (point) token)
>> +                         (prog1 (list (or (funcall op-forw toklevels) t)
>> +                                      (point) token)
>>                             (goto-char pos)))))
>>                 (t
>>                  (let ((lastlevels levels))
> I do not understand what case this intends to solve.  When I try to
> "bump into a closing thingy in the forward direction" with the current
> code, it seems to work correctly.

In test/indent/modula2.mod,

   (smie-backward-sexp) after IF returns ((172) ...) = "bumped into


  (smie-forward-sexp) before END returns (0 ...) = "couldn't skip token
  because its level is too high", which is not correct.

Return values of the form ((NUMBER) ...) are not documented.

Doc string of smie-forward-sexp:
"open-paren or the beginning of buffer" should be "close-paren or the end of 

Sorry for the rather late reply.

reply via email to

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