help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to complete \] when I input \[ .


From: Thierry Volpiatto
Subject: Re: How to complete \] when I input \[ .
Date: Sat, 16 Aug 2008 16:55:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"xiaopeng hu" <address@hidden> writes:

> I mean \[ \].  thanks
>
> 2008/8/16 David Hansen <address@hidden>
>
>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]