Re: How to simulate pressing a key
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: How to simulate pressing a key         

Group: gnu.emacs.help · Group Profile
Author: Nikolaj Schumacher
Date: Sep 20, 2008 03:59

netawater yahoo.com.cn> 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
no comments
diggit! del.icio.us! reddit!