From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ronald" Newsgroups: gmane.emacs.help Subject: Re: efficient editing question (hot key , ccmode) Date: Wed, 22 Nov 2006 12:06:57 +0800 Organization: Bentium Ltd. (CN99) Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1164170434 1579 80.91.229.2 (22 Nov 2006 04:40:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Nov 2006 04:40:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 22 05:40:32 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmjuQ-0001uD-Sk for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Nov 2006 05:40:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmjuQ-0005Kw-A0 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Nov 2006 23:40:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.cn99.com!news.yaako.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: 222.125.198.229 Original-X-Trace: news.yaako.com 1164168467 14691 222.125.198.229 (22 Nov 2006 04:07:47 GMT) Original-X-Complaints-To: usenet@news.yaako.com Original-NNTP-Posting-Date: Wed, 22 Nov 2006 04:07:47 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Response Original-Xref: shelby.stanford.edu gnu.emacs.help:143256 Original-To: help-gnu-emacs@gnu.org 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:38873 Archived-At: "Kevin Rodgers" ??????:mailman.951.1164126341.2155.help-gnu-emacs@gnu.org... > Ronald wrote: >> If I press ``M-(", there will be a space before `(' , >> how to inhibit it? > > ,----[ C-h k M-( ] > | M-( runs the command insert-parentheses > | which is an interactive compiled Lisp function in `lisp.el'. > | It is bound to M-(. > | (insert-parentheses &optional arg) > | > | Enclose following arg sexps in parentheses. > | Leave point after open-paren. > | A negative arg encloses the preceding arg sexps instead. > | No argument is equivalent to zero: just insert `()' and leave point > between. > | If `parens-require-spaces' is non-nil, this command also inserts a space > | before and after, depending on the surrounding characters. > | If region is active, insert enclosing characters at region boundaries. > | > | [back] > `---- > >> And how to let ``{}" work in the same way? > > (global-set-key "\M-{" 'insert-pair) > Maybe I should get the function,``insert-pair",first. >> When the caret is in the middle of a line, >> how to new a line and move the caret there automatically? > > If by caret you mean point: C-e RET Maybe I should define something like C-; , who has less key strokes. > > -- > Kevin > > >