From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/22810 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE Newsgroups: gmane.emacs.gnus.general Subject: Re: Editing (text/enriched) parts revisited Date: 26 Apr 1999 17:14:34 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035160662 31265 80.91.224.250 (21 Oct 2002 00:37:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:37:42 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA06451 for ; Mon, 26 Apr 1999 11:16:41 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB04971; Mon, 26 Apr 1999 10:15:54 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 26 Apr 1999 10:16:26 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id KAA29173 for ; Mon, 26 Apr 1999 10:16:17 -0500 (CDT) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA06425 for ; Mon, 26 Apr 1999 11:15:59 -0400 (EDT) Original-Received: from ramses.cs.uni-dortmund.de (ramses.cs.uni-dortmund.de [129.217.20.180]) by waldorf.cs.uni-dortmund.de with SMTP id RAA01482 for ; Mon, 26 Apr 1999 17:14:35 +0200 (MES) Original-Received: (grossjoh@localhost) by ramses.cs.uni-dortmund.de id RAA14178; Mon, 26 Apr 1999 17:14:35 +0200 Original-To: ding@gnus.org In-Reply-To: =?iso-8859-1?q?Fran=E7ois?= Pinard's message of "26 Apr 1999 10:50:47 -0400" Original-Lines: 24 User-Agent: Gnus/5.070083 (Pterodactyl Gnus v0.83) Emacs/20.3.8 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:22810 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:22810 François Pinard writes: > I got a slight problem, maybe some of you have a solution for it? > If I use `M-m p' followed by `M-x c-mode' to edit some C code > right in a message, the `C-c C-c' local keymap stops being > available to end editing that part, as `C-c C-c' means > `comment-region' in C mode. I'm no big Emacs LISP expert, maybe > someone might explain me how I could override `C-c C-c' > nevertheless? Or else, maybe we might choose another binding? The Emacs server (see the emacsclient program) uses C-x #, and since we can probably assume that the server-edit binding is not needed in buffers created by M-m p... A way to override the binding would the as follows: In M-m p, you ask for a major mode to use. You then execute the major mode function. After that, you make a copy of the current local keymap and tell the current buffer to use that copy as the local keymap. Since this is a unique Lisp object, you can redefine the C-c C-c binding without clobbering the normal c-mode-map (say). kai -- Abort this operation? [Abort] [Cancel]