From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Meisel Newsgroups: gmane.emacs.help Subject: Re: Emacs-Lisp Q: Minor mode keymap Date: Fri, 27 Apr 2007 09:25:24 +0200 Message-ID: <4631A564.4010804@web.de> References: <1332jm5qdlpdnaf@corp.supernews.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1177658773 28408 80.91.229.12 (27 Apr 2007 07:26:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Apr 2007 07:26:13 +0000 (UTC) To: Emacs Mailing List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 27 09:26:11 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HhKqG-0006Ti-JI for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Apr 2007 09:26:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HhKw5-0000wW-7f for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Apr 2007 03:32:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HhKvr-0000wH-Ro for help-gnu-emacs@gnu.org; Fri, 27 Apr 2007 03:31:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HhKvp-0000w5-Dh for help-gnu-emacs@gnu.org; Fri, 27 Apr 2007 03:31:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HhKvp-0000w0-8v for help-gnu-emacs@gnu.org; Fri, 27 Apr 2007 03:31:53 -0400 Original-Received: from fmmailgate03.web.de ([217.72.192.234]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HhKpz-00034K-Kc for help-gnu-emacs@gnu.org; Fri, 27 Apr 2007 03:25:51 -0400 Original-Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id 01CF47784A92 for ; Fri, 27 Apr 2007 09:25:50 +0200 (CEST) Original-Received: from [77.179.120.217] (helo=[192.168.178.26]) by smtp07.web.de with asmtp (WEB.DE 4.108 #197) id 1HhKpx-0006U2-00 for help-gnu-emacs@gnu.org; Fri, 27 Apr 2007 09:25:49 +0200 User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) In-Reply-To: <1332jm5qdlpdnaf@corp.supernews.com> X-Sender: sebastianmeisel@web.de X-Provags-ID: V01U2FsdGVkX1+fbJBAGGp+QgPgCos6f8sfQr6Tp2QobY4sAH4K Qp3Xfoij0nx8rCzUMvpAdxKXBvmTDGMjNzx/cO2x0bcCJOt4DE y6FVHQlRNn+xLViixhYg== X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43260 Archived-At: Mark Elston schrieb: > > What I would like to do is package these functions as a minor > mode with its own keymap and use \C-b in the LaTeX-mode-map > used in AucTeX. Creating the minor mode map is pretty easy. > I assume that from there I do something like: > > (define-prefix-command my-mode-map) > > or something similar. > > But from there, I don't see what to do. Do I have to modify my > .emacs to get the binding correct? Can't I do it in the minor > mode file? Put something like that in your mode file: (defvar YOUR-mode-map (let ((map (make-sparse-keymap))) (define-key map "YOURKEYS" 'YOURFUN) ... map) "Keymap for YOUR-mode.") (define-YOUR-mode "MY mode DOESSOMETHING. Basic Commands ===== ======== \\[YOURFUN]\tDOESSOMETHING. ... " :lighter "THISSHALLFILLMYENTIREMODELINETOSHOWMYMODEISON" :keymap YOUR-mode-map) <---- Replace the uppercase parts ;-) Sebastian Meisel