[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Implementation of (self-insert-command ) ??
From: |
Jim Janney |
Subject: |
Re: Implementation of (self-insert-command ) ?? |
Date: |
Tue, 16 Sep 2003 18:57:39 -0600 |
User-agent: |
MacSOUP/2.5b2 (Mac OS 9.2.2) |
Joakim Hove <hove@bccs.no> wrote:
> Hello,
>
> I am writing some simple functionality to insert the portabel variety
> of Norwegian characters in LaTeX, so that:
>
> Keyboard press Inserted in buffer
> -------------------------------------
> æ {\ae}
> ø {\o}
> å {\aa}
> ...
> -------------------------------------
>
> I have implemented this with something like:
>
> (define-key LaTeX-mode-map keycode 'latex-insert-encoded)
>
> Where the function (latex-insert-encoded) does the actual
> insertion. What I wondered was how to pass the keycode invoking
> (latex-insert-encoded) to the function (latex-insert-encoded)?
>
I think self-insert-command looks at the variable last-command-event.
You can also get the prefix argument with (interactive "P")
--
Jim Janney