From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: How to complete \] when I input \[ . Date: Mon, 15 Sep 2008 02:38:34 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: <878wuxksn4.fsf@localhorst.mine.nu> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1221446444 23574 80.91.229.12 (15 Sep 2008 02:40:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2008 02:40:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 15 04:41:40 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kf420-0008VP-Cu for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2008 04:41:40 +0200 Original-Received: from localhost ([127.0.0.1]:40815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf40z-00057j-FN for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2008 22:40:37 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news-xxxfer.readnews.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: panix2.panix.com Original-X-Trace: reader1.panix.com 1221446314 28461 166.84.1.2 (15 Sep 2008 02:38:34 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Mon, 15 Sep 2008 02:38:34 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: news.stanford.edu gnu.emacs.help:162257 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57599 Archived-At: In article , Thierry Volpiatto wrote: >"xiaopeng hu" writes: > >> I mean \[ \]. thanks >> >> 2008/8/16 David Hansen >> >>> 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