[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing the command bound to a key-stroke
From: |
Eli Zaretskii |
Subject: |
Re: Executing the command bound to a key-stroke |
Date: |
27 Jan 2004 11:26:40 +0200 |
> Date: Mon, 26 Jan 2004 08:33:13 +0100
> From: Arjan Bos <Arjan.Bos@nospam.ISeeYou.nl>
> Newsgroups: gnu.emacs.help
>
> (if (eq (local-key-binding "\C-j")
> 'netrexx-indent-newline-indent-with-end-comment)
> (netrexx-indent-newline-indent-with-end-comment)
> ;; else
> (netrexx-indent-newline-indent)))
>
> The problem with this is that \C-j might be bound to some other command
> and that isn't handled by my code. 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.
I think you want this, or some variant thereof:
(call-interactively (key-binding "\C-j"))