[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35496: 27.0.50; smie-blink-matching-open blinks token before point a
From: |
Stefan Monnier |
Subject: |
bug#35496: 27.0.50; smie-blink-matching-open blinks token before point after RET |
Date: |
Tue, 07 May 2019 21:44:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> 1. Disable show-paren-mode if it's enabled.
> 2. Evalute the attached .el file (which defined a major mode).
> 3. Create a new bufferand type M-x foo-mode.
> 4. Type 'def foo do' (without quotes) and press RET.
> 5. Cursor will hang around on the first line even after the newline
> is inserted.
It's not a bug, it's a feature: we can't highlight the matching `def`
when you hit the `o` because we don't know yet whether you actually
intended to type `do` or a longer identifier, so we postpone the
blinking to the next char.
smie-blink-matching-triggers defaults to ?\s and ?\n so the "next char"
where the blinking can happen is SPC or RET.
Maybe we shouldn't postpone the blinking (i.e. we should add ?o to
smie-blink-matching-triggers)?
Stefan