[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC Mode and electric-pair "problem".
From: |
João Távora |
Subject: |
Re: CC Mode and electric-pair "problem". |
Date: |
Wed, 27 Jun 2018 14:37:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
Hi Alan
>> > unclosed quote will only cause refontification up to the end of the line?
>> > That would be a very nice improvement. I don't use electric-pair-mode, and
>> > as things currently stand inserting an unmatched quote applies
>> > font-lock-string-face to the entire buffer, which is a bit annoying.
>> (add-hook 'post-self-insert-hook
>> (lambda ()
>> ...
>> (insert last-command-event)))))))
>> 'append 'local)
>
> This is effectively electric-pair-mode, which if enabled, already
> inserts two "s when you type ".
>
> Not everybody likes electric-pair-mode. I don't think your suggestion
> is any better than mine (snipped) to which you replied.
To be perfectly honest, I got confused by Stefan's suggestion, too. If
the goal is to have electric-pair-mode-like behaviour, just turn on
electric-pair-mode.
I'd just like to point out, however, that automatically pairing quotes
and parens extends far beyond electric-pair-mode. Of course I think
it's the best of the bunch, but there are other popular packages like
smartparens, paredit, wrap-region, textmate (and even my previous
autopair which some insist on using for some reason).
João
- 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 <=
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/28
- 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