GNU bug report logs - #21896
24.5; Inconsistent handling of braces in smie

Previous Next

Package: emacs;

Reported by: mail <at> ap4y.me

Date: Fri, 13 Nov 2015 03:14:01 UTC

Severity: normal

Tags: moreinfo

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: mail <at> ap4y.me
Cc: 21896 <at> debbugs.gnu.org
Subject: bug#21896: 24.5; Inconsistent handling of braces in smie
Date: Thu, 03 Dec 2020 11:44:26 +0100
mail <at> ap4y.me writes:

> Using 2 possible ways of hanling braces tokens:
>
> 1. Using default lexer rules for braces (as per documentation).
> 2. Manually tokenizing braces in lexer (uncomment lines 196-197 and
> 213-214 in provided source file)
>
> I'm getting different indentation results. For the case number 1,
> indentation of the consutriction:
>
> if true {
>     |foo
> }
>
> is invalid and from the logs it seems like smie doesn't parse this
> constructor correctly.
>
> For the case number 2 indentation works as expected, but for the
> construction like this (which is a simple sexp):
>
> {
> }|
>
> I'm getting "Mismatching parenthesis" error when I'm calling
> blink-matching-open.

(This bug report unfortunately got no response at the time.)

I tried reproducing this bug in Emacs 28 by loading the supplied Swift
mode, and then indenting the the example, and I got this:

if true {
           foo
       }

Which I assume isn't correct?

For the second problem, blink-matching-open seemed to do the correct
thing.

Before debugging further -- are you still seeing these problems with a
more recent Emacs/swift mode?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 120 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.