[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: electric-pair-mode
From: |
Tassilo Horn |
Subject: |
Re: electric-pair-mode |
Date: |
Fri, 29 Nov 2013 18:10:32 +0100 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> Ok, now I've found a mode where it's a problem. AUCTeX has its own
>> TeX-ified brace pairing feature which for example knows that \left(
>> has to be closed by \right(, \{ by \}, etc. With
>> `electric-pair-mode' enabled, when typing a { I get two closing
>> braces.
>
> Yes, that is a problem. AUCTeX's pairing should be made aware of
> electric-pair-mode (including being enabled/disabled by
> calling/setting electric-pair-mode as well).
>
>> Right now, I have "disabled" `electric-pair-mode' for auctex using:
>
>> ;; AUCTeX brace pairing feature doesn't play nice with `electric-pair-mode'
>> ;; which is a global minor mode as of emacs 24.4.
>> (when (and (boundp 'electric-pair-mode)
>> (boundp 'electric-pair-inhibit-predicate))
>> (set (make-local-variable 'electric-pair-inhibit-predicate)
>> (lambda (char) t))))
>
> A simpler way to disable it is to set electric-pair-mode to nil
> (buffer-locally). No need to check boundp of anything.
Ah, that's indeed much better.
Thanks,
Tassilo
- Re: electric-indent-mode (was Re: electric-pair-mode), (continued)
- Re: electric-pair-mode, Tassilo Horn, 2013/11/21
- Re: electric-pair-mode, Stefan Monnier, 2013/11/21
- Re: electric-pair-mode, Alexander Baier, 2013/11/22
- Re: electric-pair-mode, Tassilo Horn, 2013/11/22
- Re: electric-pair-mode, Alexander Baier, 2013/11/22
- Re: electric-pair-mode, Tassilo Horn, 2013/11/22
- Re: electric-pair-mode, Stefan Monnier, 2013/11/22
- Re: electric-pair-mode, Tassilo Horn, 2013/11/29
- Re: electric-pair-mode, Stefan Monnier, 2013/11/29
- Re: electric-pair-mode,
Tassilo Horn <=