From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Arjan Bos Newsgroups: gmane.emacs.help Subject: Executing the command bound to a key-stroke Date: Mon, 26 Jan 2004 08:33:13 +0100 Organization: Wanadoo Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <4015f9b9$0$98740$d5255a0c@news.wanadoo.nl> Reply-To: Arjan.Bos@ISeeYou.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1075183400 28029 80.91.224.253 (27 Jan 2004 06:03:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2004 06:03:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 27 07:03:15 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlMJf-0007gb-00 for ; Tue, 27 Jan 2004 07:03:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlM3X-0002ot-75 for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Jan 2004 00:46:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news2.telebyte.nl!lightspeed.eweka.nl!news.cambrium.nl!news.cambrium.nl!news.cambrium.nl!news2.euro.net!postnews1.euro.net!news.wanadoo.nl!not-for-mail User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Date: 27 Jan 2004 05:40:10 GMT Original-NNTP-Posting-Host: i0739.vwa.wanadoo.nl Original-X-Trace: 1075182010 marvin.euronet.nl 98740 194.134.206.227:28794 Original-X-Complaints-To: abuse@wanadoo.nl Original-Xref: shelby.stanford.edu gnu.emacs.help:120455 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16401 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16401 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