[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: electric pair mode and latex
From: |
Laurent Hoeltgen |
Subject: |
Re: electric pair mode and latex |
Date: |
Thu, 21 Jun 2012 05:16:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 06/20/2012 02:41 PM, Jeremiah Dodds wrote:
> Laurent Hoeltgen <hoeltgman@gmail.com> writes:
>
>> On 06/20/2012 07:50 AM, Jeremiah Dodds wrote:
>>> Laurent Hoeltgen <hoeltgman@gmail.com> writes:
>>>
>>>> Hi,
>>>>
>>>> electric pair mode automatically closes parentheses like (,[,{,... Can I
>>>> customize this such that when I edit a latex document it also closes
>>>> expressions like \left( with \right)?
>>>>
>>>> Regards,
>>>> Laurent
>>>
>>> Yup, see 'electric-pair-pairs'
>>>
>>
>> Hi,
>>
>> if I try to change this option (through the customize interface) by
>> adding \left( and \right) to the list, emacs complains with the
>> following message:
>>
>> Saving electric-pair-pairs: This field should contain a single character.
>>
>> Regards,
>> Laurent
>
> Sorry for the disinfo, I didn't actually attempt to customize it, only
> saw that it was customizable, and assumed that it would allow arbitrary,
> as opposed to single-character-only pair definitions.
>
> Perhaps you can get something working with skeleton-mode
> (http://www.emacswiki.org/emacs/SkeletonPair) ?
>
Hi,
after a bit of googling I actually found this:
http://inthearmchair.wordpress.com/2008/11/01/automatically-inserting-matching-parentheses-for-latex-in-emacs/
which does exactly what I want.
Regards,
Laurent