[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to rebind keys "C-j" to join-line
From: |
Daniel Jensen |
Subject: |
Re: How to rebind keys "C-j" to join-line |
Date: |
Fri, 03 Aug 2007 13:57:49 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
"Alex Wei" <swei@arrayinc.com> writes:
> I add the following lines into my .emacs file, but it dosen't work, How can I
> rebind the key "C-j" to join-line ?
>
> (global-set-key (kbd "C-j") 'join-line)
There's nothing wrong with this line. Why doesn't it work for you? It
binds a key in the global map. Did you expect a different result?
> (local-set-key (kbd "C-j") 'join-line)
You can delete this line. It's fine in a hook function, not stand-alone
like this. To bind the key for a specific mode, use something like this:
(add-hook 'foo-mode-hook
(lambda ()
(local-set-key (kbd "C-j") 'join-line)))
- Re: How to rebind keys "C-j" to join-line, (continued)
- Re: How to rebind keys "C-j" to join-line, Dieter Wilhelm, 2007/08/06
- Re: How to rebind keys "C-j" to join-line, Alex Wei, 2007/08/06
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Alex Wei, 2007/08/07
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Dieter Wilhelm, 2007/08/07
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Alex Wei, 2007/08/07
- Message not available
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Daniel Jensen, 2007/08/07
Re: How to rebind keys "C-j" to join-line,
Daniel Jensen <=