emacs-devel
[Top][All Lists]
Advanced

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

Re: key binding question


From: Stefan Monnier
Subject: Re: key binding question
Date: Sat, 03 Nov 2007 10:12:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> How can I, in Lisp, bind command `bar' to `foo's key, but with the Control
> and Meta modifiers added. So, for example, if `foo' = [S-iso-lefftab], then
> the code would bind `bar' to [C-M-S-iso-lefttab].

You first have to define what "add control and meta modifiers" mean when
applied not to a key but to a key-sequence.

Then you might be able to use something like

  (define-key map
              (apply 'vector (mapcar (lambda (k) (list 'meta 'control k)) foo))
              'bar)


-- Stefan




reply via email to

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