|
From: | Sebastian Meisel |
Subject: | Re: Emacs-Lisp Q: Minor mode keymap |
Date: | Fri, 27 Apr 2007 09:25:24 +0200 |
User-agent: | Thunderbird 1.5.0.10 (Macintosh/20070221) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |