From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: C-j is not doing as it is being told Date: Sat, 6 Mar 2004 09:28:04 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <4j5c2c.q5.ln@acm.acm> References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1078950338 26653 80.91.224.253 (10 Mar 2004 20:25:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Mar 2004 20:25:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 10 21:25:15 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B1AGQ-0005nt-00 for ; Wed, 10 Mar 2004 21:25:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1AFl-00034U-58 for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Mar 2004 15:24:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!npeer.de.kpn-eurorings.net!newsfeed.stueberl.de!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1078594062 55398 193.149.49.134 (6 Mar 2004 17:27:42 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 6 Mar 2004 17:27:42 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:121507 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17501 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17501 Ketil Karstad 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").