From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: Key binding problem Date: Mon, 26 Feb 2007 19:41:30 +0100 Message-ID: <3995.1172515290@localhost> References: <1172496209.317241.112620@s48g2000cws.googlegroups.com> <1172496830.927732.168870@t69g2000cwt.googlegroups.com> <1172508862.399116.33070@p10g2000cwp.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1172515489 5597 80.91.229.12 (26 Feb 2007 18:44:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Feb 2007 18:44:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "tubescreamer808@gmail.com" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 26 19:44:33 2007 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 1HLkpt-0000Fj-5r for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Feb 2007 19:44:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLkps-0004Tz-M6 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Feb 2007 13:44:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HLkpc-0004SA-M6 for help-gnu-emacs@gnu.org; Mon, 26 Feb 2007 13:44:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HLkpa-0004Ry-9F for help-gnu-emacs@gnu.org; Mon, 26 Feb 2007 13:44:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLkpa-0004Rv-4p for help-gnu-emacs@gnu.org; Mon, 26 Feb 2007 13:44:14 -0500 Original-Received: from smtp5-g19.free.fr ([212.27.42.35]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HLkpZ-0003iO-Ov for help-gnu-emacs@gnu.org; Mon, 26 Feb 2007 13:44:13 -0500 Original-Received: from localhost.localdomain (chn51-3-88-163-173-156.fbx.proxad.net [88.163.173.156]) by smtp5-g19.free.fr (Postfix) with ESMTP id 085FB35BC4; Mon, 26 Feb 2007 19:44:09 +0100 (CET) Original-Received: from localhost (IDENT:1001@localhost [127.0.0.1]) by localhost.localdomain (8.13.8/8.13.8) with ESMTP id l1QIfUfG003996; Mon, 26 Feb 2007 19:41:30 +0100 In-reply-to: <1172508862.399116.33070@p10g2000cwp.googlegroups.com> Comments: In-reply-to "tubescreamer808@gmail.com" message dated "26 Feb 2007 08:54:22 -0800." X-Mailer: MH-E 8.0.2; nmh 1.2; GNU Emacs 22.0.51 X-detected-kernel: Linux 2.4 (Google crawlbot) 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:41488 Archived-At: tubescreamer808@gmail.com wrote: > Thank you very much weber, it works perfectly. > > Alternatively, I have just discovered that using the kbd macro works > fine also e.g. > (local-set-key (kbd "C-|") 'indent-region) > > Don't ask me why I never tried it before since I was already using it > for the newline-and-indent binding. I guess that sometimes things are > just too obvious or you're just too stupid... You are not stupid at all. The two versions are perfectly right kbd macro is just "the new syntax" to define key bindings. It has been introduced into emacs 20.x as far as I remember. [()} is called the XEmacs way and has been supported (and is still supported) by older emacs. There is also the string syntax but I do not use it. Xavier