From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: How to rebind keys "C-j" to join-line Date: Mon, 06 Aug 2007 23:00:25 +0200 Organization: The Church of Emacs Message-ID: <87ejigjs46.fsf@debby.local.net> References: <1EA8C5CAFEE34474B0BC8809A468377F@array8f42e753d> <87r6mkngx6.fsf@debby.local.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186433999 31532 80.91.229.12 (6 Aug 2007 20:59:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2007 20:59:59 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Alex Wei" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 22:59:57 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 1II9gB-0006y6-PU for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2007 22:59:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II9g9-0004cb-SM for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2007 16:59:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1II9fw-0004cO-95 for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 16:59:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1II9fq-0004bg-Eu for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 16:59:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II9fq-0004bY-BI for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 16:59:34 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1II9fn-0007jM-HJ for help-gnu-emacs@gnu.org; Mon, 06 Aug 2007 16:59:32 -0400 Original-Received: from [89.12.158.249] (helo=debby.local.net) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis), id 0MKwpI-1II9fb3i1Y-00050w; Mon, 06 Aug 2007 22:59:20 +0200 Original-Received: from dieter by debby.local.net with local (Exim 4.63) (envelope-from ) id 1II9gf-00036m-SI; Mon, 06 Aug 2007 23:00:25 +0200 In-Reply-To: (Alex Wei's message of "Mon\, 6 Aug 2007 10\:17\:04 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Provags-ID: V01U2FsdGVkX1/SFln6zwic0g6h8vk4yF1FvLEtM2v/SEZgVyi JkL7oeztSUNjs0zycLTsA+mpbTiGyKYP8vmBm9+Pj9kU80xejo EexXlp+uAZOZarVXJ1/FRt6ok4MI4Te X-Detected-Kernel: Linux 2.6? (barebone, rare!) 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:46361 Archived-At: "Alex Wei" writes: > Thanks H. Dieter Wilhelm > > I don't need the original C-j keybinding, the "M-^" needs to press 3 keys at I see, (I, personally, count M+SHIFT as one key, pressed at the same time ;-) > same time, so I want to rebind the C-j to join-line. I am just wondering how to > rebind the key or how can I find the hook. > > After opening the Emacs, I type (local-set-key (kbd "C-j") 'join-line) and > then Cx Ce, It works!! Have you tried (global-set-key)? Maybe local-set-key works only in the *scratch* buffer at start-up? Sorry I'm not sure. -- Best wishes H. Dieter Wilhelm Darmstadt, Germany