emacs-devel
[Top][All Lists]
Advanced

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

Re: key binding question


From: Lennart Borgman (gmail)
Subject: Re: key binding question
Date: Sat, 03 Nov 2007 02:35:30 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

Drew Adams wrote:
I have a user variable `foo' whose value has the same form as a key-sequence
argument to `define-key'. That's all I know.

So, for example, `foo' might have value [S-iso-lefftab] or "\C-e" or [?\C-x
?] or "^E" (i.e. Control-E) or whatever might be acceptable to `define-key'.

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].

If this is too difficult, suppose that `foo's value were guaranteed to
always be a vector - same question.

Can anyone help with this?

I think you can do it with key-description and kbd. And some work.




reply via email to

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