From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jjanney@xmission.com (Jim Janney) Newsgroups: gmane.emacs.help Subject: Re: Implementation of (self-insert-command ) ?? Date: Tue, 16 Sep 2003 18:57:39 -0600 Organization: XMission http://www.xmission.com/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1g1e6zt.1ikscmrjjgjiuN%jjanney@xmission.com> References: <4yad96a2yb.fsf@skjellgran.ii.uib.no> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1063760487 18324 80.91.224.253 (17 Sep 2003 01:01:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 Sep 2003 01:01:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 17 03:01:25 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19zQhB-0007xC-00 for ; Wed, 17 Sep 2003 03:01:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19zQgD-0007ri-2F for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Sep 2003 21:00:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!xmission!nnrp.xmission!jjanney Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: slc406.modem.xmission.com Original-X-Trace: terabinaries.xmission.com 1063760234 23836 166.70.2.152 (17 Sep 2003 00:57:14 GMT) Original-X-Complaints-To: abuse@xmission.com Original-NNTP-Posting-Date: Wed, 17 Sep 2003 00:57:14 +0000 (UTC) User-Agent: MacSOUP/2.5b2 (Mac OS 9.2.2) Original-Xref: shelby.stanford.edu gnu.emacs.help:116650 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12571 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12571 Joakim Hove 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