[Top][All Lists]

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

Re: Enabling and disabling my own keymap

From: Kevin Rodgers
Subject: Re: Enabling and disabling my own keymap
Date: Thu, 22 May 2008 06:17:03 -0600
User-agent: Thunderbird (Macintosh/20080421)

TheLonelyStar wrote:

I feel like I posted this question a few days ago... but I can not find it
in the forum. I hope I am not double posting.

I want to create a keymap, set some keys in it and enable/disable it "on the
I tried:
(setq my-keymap (make-sparse-keymap))
(defvar my-keymap-enabled)
(setq minor-mode-map-alist (cons '(my-keymap-enabled . my-keymap)
(setq my-keymap-enabled t)

But when I set a key using
(define-key my-keymap (kbd "{") 'curly-bracket)

The { key is not bound to "curly-bracket".
What am I doing wrong?

The symbol my-keymap is not a keymap, its value is a keymap:

(setq minor-mode-map-alist
      (cons `(my-keymap-enabled . ,my-keymap) minor-mode-map-alist))

Kevin Rodgers
Denver, Colorado, USA

reply via email to

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