[Top][All Lists]

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

Re: Global keymaps

From: Juri Linkov
Subject: Re: Global keymaps
Date: Sun, 29 Jun 2008 19:17:47 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>> A name like `ctl-x-n-map' is not descriptive indeed, but at least it
>> doesn't limit the keymap to one particular functionality, and keeps
>> it open for further unrelated bindings.  Since we already very tight
>> on available keys, who knows what commands we will need in future on
>> these keymaps especially if they will have unrelated but good mnemonics.
> Hopefully, by the time we bump into this problem, we'll have multiple
> inheritance for keymaps, so we can just define ctl-x-n-map to be a map
> that inherits from narrow-map and from the-other-n-thing-map.

I'd like to ascertain what could be done now.  In addition
to register and rectangle commands, `C-x r' also includes
keybindings for the bookmark package. So a keymap name like
`register-rectangle-bookmark-and-anything-more-map' clearly
is not an option.  So we need to separate "physical" maps
(bound to physical key sequences) and "logical" maps (like
narrow-map and abbrev-map where keys are grouped by functionality).

The package bookmark.el already defines a map `bookmark-map',
but it is not bound to any key by default.  It also adds
three keys to the `C-x r' prefix as:

  ;;;###autoload (define-key ctl-x-map "rb" 'bookmark-jump)
  ;;;###autoload (define-key ctl-x-map "rm" 'bookmark-set)
  ;;;###autoload (define-key ctl-x-map "rl" 'bookmark-bmenu-list)

So it seems inevitable to create a new map `ctl-x-r-map' and bind
these key to it as:

  ;;;###autoload (define-key ctl-x-r-map "b" 'bookmark-jump)
  ;;;###autoload (define-key ctl-x-r-map "m" 'bookmark-set)
  ;;;###autoload (define-key ctl-x-r-map "l" 'bookmark-bmenu-list)

Alternatively, when multiple inheritance will be available, a keymap
with these three keys could be named as `bookmark-mixin-map' to be
merged with register and rectangle maps in ctl-x-r-map.

Juri Linkov

reply via email to

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