help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Executing the command bound to a key-stroke


From: Arjan Bos
Subject: Re: Executing the command bound to a key-stroke
Date: Wed, 28 Jan 2004 20:57:22 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624

Joakim Hove wrote:

Arjan Bos <Arjan.Bos@nospam.ISeeYou.nl> writes:


What I would like is to execute the command bound to \C-j
directly. I've tried several things, but they all failed me, hence
this kludge.


M-x apropos bind <return>:

   (key-binding KEY &optional ACCEPT-DEFAULT NO-REMAP)

   Return the binding for command KEY in current keymaps.
   KEY is a string or vector, a sequence of keystrokes.
   The binding is probably a symbol with a function definition.

   [....]

i.e M-x apropos is a *really good* friend!


I.e. I guess something like

  (funcall (key-binding "\C-j"))

should do the trick.

And indeed it does!
Thanks!

Arjan

--
If you really want to contact me, then replace the "I see you" text by its three letter accronym, ICU.

Fabricate Diem PVNC, Motto of the Night Watch -- Terry Pratchett



reply via email to

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