help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding Keymap prefix to Major Mode


From: rgb
Subject: Re: Binding Keymap prefix to Major Mode
Date: 1 Apr 2005 18:26:10 -0800
User-agent: G2/0.2

Tim Johnson wrote:
> Hi:
> I've been working on a major mode for the rebol programming language.
> The following code has been evaluated:
> (defvar rebol-keymap (make-sparse-keymap) "Rebol mode keymap")
> (defcustom rebol-keymap-prefix [(control ?')]
>    "*Keymap prefix string for rebol-keymap"
>    :type 'string
>    :group 'rebol)
> (local-set-key rebol-keymap-prefix rebol-keymap)
> (define-key rebol-keymap "b" 'previous-rebol-definition)
> ;; When I load a file that auto-loads the mode, I find
> ;; that "b" is bound to 'previous-rebol-definition, not
> ;; to "\C-' b" which is what I hope for.
> NOTE: I've tried [(control \')] and [(control c)(control c)]
> as prefix symbols with the same (lack of) results.
> I presume that something else needs to be done to properly bind
> this prefix to the keymap.
>
> All help, docs and examples are welcome.
>
It works for me.
I'm thinking the problem is in your rebol-mode function.
What does your (use-local-map ...) statement look like?
If it says (use-local-map rebol-keymap) that would
certainly explain it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]