From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: How to simulate pressing a key Date: Sat, 20 Sep 2008 12:59:10 +0200 Message-ID: References: <878wtop3t8.fsf@emacs.Arch.net> <873ajvttt2.fsf@emacs.Arch.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221908392 11650 80.91.229.12 (20 Sep 2008 10:59:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2008 10:59:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: netawater Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 20 13:00:40 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kh0CZ-0005pv-Q5 for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Sep 2008 13:00:36 +0200 Original-Received: from localhost ([127.0.0.1]:41677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kh0BY-00049f-CJ for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Sep 2008 06:59:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kh0BH-00047A-O0 for help-gnu-emacs@gnu.org; Sat, 20 Sep 2008 06:59:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kh0BG-00045j-BQ for help-gnu-emacs@gnu.org; Sat, 20 Sep 2008 06:59:14 -0400 Original-Received: from [199.232.76.173] (port=46033 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kh0BG-00045g-5j for help-gnu-emacs@gnu.org; Sat, 20 Sep 2008 06:59:14 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:33402) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kh0BF-0005xs-LD for help-gnu-emacs@gnu.org; Sat, 20 Sep 2008 06:59:13 -0400 Original-Received: from thursday (kobz-590e70fb.pool.einsundeins.de [89.14.112.251]) by dd18200.kasserver.com (Postfix) with ESMTP id B8DBD1801D405; Sat, 20 Sep 2008 12:59:14 +0200 (CEST) In-Reply-To: <873ajvttt2.fsf@emacs.Arch.net> (netawater's message of "Sat\, 20 Sep 2008 10\:50\:01 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57846 Archived-At: netawater wrote: > I do not want to interactive call a function but call it like pressing > a key. I think you do, you just don't know it yet. :) You want to do something like thas (defun do-what-backspace-does () (interactive) (call-interactively (key-binding "\C-?"))) > my aim is to binding a funtion to tab key in every mode: if cursor is at > the end of word then call M-TAB's function, else call TAB's function. This, however, might not work. Because if you bind your function to tab, you might be unable to retrieve the original binding. regards, Nikolaj Schumacher