[Top][All Lists]

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

Binding Keymap prefix to Major Mode

From: Tim Johnson
Subject: Binding Keymap prefix to Major Mode
Date: Fri, 01 Apr 2005 14:59:06 -0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2

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.


reply via email to

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