[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC Mode and electric-pair "problem".
From: |
Stefan Monnier |
Subject: |
Re: CC Mode and electric-pair "problem". |
Date: |
Thu, 28 Jun 2018 23:42:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> This is effectively electric-pair-mode, which if enabled, already
> inserts two "s when you type ".
It's very different: it inserts/removes the second " at the end of the
line, so it ends up behaving very much like your current code, except:
- it only affects self-insert-command.
- it uses an explicit " character rather than a syntax-table text-property.
So OT1H it provides a behavior closer to current `master` than to
electric-pair-mode, but like electric-pair-mode it has a fairly focus'd
effect, so is less likely to have unexpected interactions.
> Not everybody likes electric-pair-mode. I don't think your suggestion
> is any better than mine (snipped) to which you replied.
Its main benefit is that it's very superficial with a narrow focus.
No need to change any core API like syntax-tables with a feature which
will need to be supported for the next very many years.
Stefan
- Re: Fontifying unterminated strings [was: CC Mode and electric-pair "problem".], (continued)
- Re: CC Mode and electric-pair "problem"., Stephen Leake, 2018/06/18
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/18
- Re: CC Mode and electric-pair "problem"., Clément Pit-Claudel, 2018/06/18
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/19
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/19
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/20
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/26
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/27
- Re: CC Mode and electric-pair "problem".,
Stefan Monnier <=
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/27
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/29
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Eli Zaretskii, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/26
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/26