[Top][All Lists]

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

Re: other-frame, other-window prefix keys

From: Kalle Olavi Niemitalo
Subject: Re: other-frame, other-window prefix keys
Date: Sun, 09 Aug 2015 11:10:17 +0300
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux)

Stephen Leake <address@hidden> writes:

> I agree it would be nice. I think that means redoing all those bindings.
> But that's only about 10, so it's doable. But that doesn't handle
> third-party additions to the C-x 4/5 prefix key maps.

If those third-party additions are using
  (define-key ctl-x-4-map (kbd "z") 'foo)
rather than
  (global-set-key (kbd "C-x 4 z") 'foo)
then I think you can handle it, by changing ctl-x-4-prefix and
ctl-x-5-prefix to functions that temporarily add ctl-x-4-map or
ctl-x-5-map as a minor-mode keymap and then read a key sequence.

And if they are using global-set-key, then I think it can be
hacked around by doing
  (put 'ctl-x-4-prefix 'define-key-keymap ctl-x-4-map)
  (put 'ctl-x-5-prefix 'define-key-keymap ctl-x-5-map)
and changing define-key to follow the define-key-keymap property
if the keymap contains a symbol whose function definition is a
function and the key sequence didn't end yet.

reply via email to

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