| Re: How to complete \] when I input \[ . |
|
 |
|
 |
|
 |
|
 |
Group: gnu.emacs.help · Group Profile
Author: David CombsDavid Combs Date: Sep 14, 2008 19:38
In article gnu.org>,
Thierry Volpiatto gmail.com> wrote:
>"xiaopeng hu" gmail.com> writes:
>
>> I mean \[ \]. thanks
>>
>> 2008/8/16 David Hansen gmx.net>
>>
>>> On Sat, 16 Aug 2008 21:09:46 +0800 xiaopeng hu wrote:
>>>
>>>> When I input \[ , how to complete \] and put point at middle?
>>>>
>>>
>>> Should work:
>>>
>>> (global-set-key (kbd "[") #'insert-pair)
>>>
>>> David
>
>,----
>| (defun insert-second-hook ()
>| (interactive)
>| (insert "\[\\]")
>| (goto-char (- (point) 2)))
>| (global-set-key (kbd "\[") 'insert-second-hook)
>`----
>
>--
>A + Thierry Volpiatto
>Location: Saint-Cyr-Sur-Mer - France
If you're got time, please briefly explain how it works, what it does, etc.
Thanks!
David
|