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

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

Executing the command bound to a key-stroke


From: Arjan Bos
Subject: Executing the command bound to a key-stroke
Date: Mon, 26 Jan 2004 08:33:13 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624

How do I execute the command bound to \C-j ?

I've written my own major mode (netrexx-mode.el) and one of the pieces of elisp I have in there worry me. I feel that there should be a more consise way of doing it.

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

TIA,

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]