* C-j is not doing as it is being told
@ 2004-03-03 17:53 Ketil Karstad
0 siblings, 0 replies; 4+ messages in thread
From: Ketil Karstad @ 2004-03-03 17:53 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 356 bytes --]
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?
Cheers,
kjitta
[-- Attachment #1.2: Type: text/html, Size: 1213 bytes --]
[-- Attachment #2: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: C-j is not doing as it is being told
[not found] <mailman.1116.1078524441.340.help-gnu-emacs@gnu.org>
@ 2004-03-05 22:56 ` Barry Margolin
2004-03-06 9:28 ` Alan Mackenzie
1 sibling, 0 replies; 4+ messages in thread
From: Barry Margolin @ 2004-03-05 22:56 UTC (permalink / raw)
In article <mailman.1116.1078524441.340.help-gnu-emacs@gnu.org>,
Ketil Karstad <ketil.karstad@physics.unige.ch> wrote:
> 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 has a local key binding. Global bindings are defaults that
local bindings can override.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: C-j is not doing as it is being told
[not found] <mailman.1116.1078524441.340.help-gnu-emacs@gnu.org>
2004-03-05 22:56 ` Barry Margolin
@ 2004-03-06 9:28 ` Alan Mackenzie
1 sibling, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2004-03-06 9:28 UTC (permalink / raw)
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").
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: C-j is not doing as it is being told
[not found] <200403060636.i266aWUl012312@mac.com>
@ 2004-03-08 18:37 ` Matthew Calhoun
0 siblings, 0 replies; 4+ messages in thread
From: Matthew Calhoun @ 2004-03-08 18:37 UTC (permalink / raw)
I was being frustrated by a similar problem until I looked at the
documentation for global-set-key. It mentions that "if KEY has a local
binding in the current buffer, that local binding will continue to
shadow any global binding that you make with this function." So I tried
inserting a call to local-set-key in the hook of the appropriate mode.
I can't say whether this is the "right" way to go about it, but it
seems to work.
Matt
El Mar 5, 2004, a las 10:36 PM, help-gnu-emacs-request@gnu.org escribió:
> 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?
>
> Cheers,
> kjitta
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-08 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200403060636.i266aWUl012312@mac.com>
2004-03-08 18:37 ` C-j is not doing as it is being told Matthew Calhoun
[not found] <mailman.1116.1078524441.340.help-gnu-emacs@gnu.org>
2004-03-05 22:56 ` Barry Margolin
2004-03-06 9:28 ` Alan Mackenzie
2004-03-03 17:53 Ketil Karstad
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.