[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-j is not doing as it is being told
From: |
Alan Mackenzie |
Subject: |
Re: C-j is not doing as it is being told |
Date: |
Sat, 6 Mar 2004 09:28:04 +0000 |
User-agent: |
tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) |
Ketil Karstad <ketil.karstad@physics.unige.ch> wrote on Wed, 03 Mar 2004
18:53:40 +0100:
> This is a multi-part message in MIME format.
You might win friends by posting in plain text format. The MIME stuff
made your post ~5 times bigger, without adding any content.
> Hi
> I wanted to remap some key combinations, including C-j. I use
> global-unset-key followed by global-set-key for each key combo and it
> works fine most of the time apart from when emacs enters Latex-mode
> where C-j reverts to its default behavoir and ignores my remapping.
> Any suggestion what is causing this and what I can do to stop it?
Latex Mode binds C-j in its local keymap. Anything in a local keymap
will override global bindings.
First of all, are you _sure_ you want to change this binding? I don't
use Latex Mode, but looking in its manual (C-h C-k C-j) find that C-j is
bound to `tex-terminate-paragraph', which does useful things like
checking for unbalanced braces, and so on.
Assuming you really are sure, the thing to do is to remove C-j from the
Latex Mode keymap. Try this in your .emacs (untested):
(eval-after-load "tex-mode"
'(define-key tex-mode-map "\C-j" nil))
> Cheers, kjitta
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").