[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invoking electirc command programmatically
From: |
Tim X |
Subject: |
Re: Invoking electirc command programmatically |
Date: |
Wed, 11 May 2005 08:36:25 +1000 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
PT <mailshield.gg@mailnull.com> writes:
> I have this electric function which inserts the character it is bound
> to and does something else too.
>
> (defun my-electric-character (&optional arg)
> "Insert the typed character and pop up a completion buffer"
> (interactive "P")
> (self-insert-command (prefix-numeric-value arg))
> ...)
>
> How can I invoke this function from my program with a certain
> character, so that it behaves just like if the user typed the
> character on the keyboard?
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
See abbrevs in the manual - I think its under autotyping or something
similar. It will allow you to define an abbrev for a character which
causes a certain function to be called anytime the user hits that
character. A number of standard modes use this technique.
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!