unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: netawater <netstandin-003@yahoo.com.cn>
To: help-gnu-emacs@gnu.org
Subject: Re: How to simulate pressing a key
Date: Sat, 20 Sep 2008 22:43:04 +0800	[thread overview]
Message-ID: <87od2izxmv.fsf@emacs.Arch.net> (raw)
In-Reply-To: mailman.19605.1221908356.18990.help-gnu-emacs@gnu.org

Nikolaj Schumacher <me@nschum.de> writes:

> netawater <netstandin-003@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

Thank you for pointing my error, :)

I have bind tab's function to ^C^t before bind this function to TAB.

Thanks.


      parent reply	other threads:[~2008-09-20 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 15:12 How to simulate pressing a key netawater
2008-09-19 15:05 ` Drew Adams
     [not found] ` <mailman.19555.1221836708.18990.help-gnu-emacs@gnu.org>
2008-09-20  2:50   ` netawater
2008-09-20  6:19     ` Drew Adams
2008-09-20  6:55       ` Drew Adams
2008-09-20  7:08         ` Thierry Volpiatto
2008-09-20 10:59     ` Nikolaj Schumacher
     [not found]     ` <mailman.19594.1221891580.18990.help-gnu-emacs@gnu.org>
2008-09-20 14:37       ` netawater
2008-09-20 16:00         ` Drew Adams
     [not found]         ` <mailman.19618.1221926415.18990.help-gnu-emacs@gnu.org>
2008-09-26 13:18           ` netawater
     [not found]     ` <mailman.19605.1221908356.18990.help-gnu-emacs@gnu.org>
2008-09-20 14:43       ` netawater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87od2izxmv.fsf@emacs.Arch.net \
    --to=netstandin-003@yahoo.com.cn \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).