[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [h-e-w] insert sterling character

From: Dr Francis J. Wright
Subject: RE: [h-e-w] insert sterling character
Date: Thu, 1 Jul 2004 14:54:29 +0100

> From: 
> address@hidden 
> [mailto:address@hidden
> rg] On Behalf Of Christopher G D Tipper
> Sent: Thursday, 1 July 2004 12:57 pm
> To: address@hidden
> Subject: [h-e-w] insert sterling character
> Hi,
> I have a US keyboard, but I'd like to remap Ctrl-Shift-$ to 
> produce a sterling symbol. I have searched info, but can't 
> seem to find a function to insert a literal character at the 
> point. Can anyone tell me what function ???? must be to get 
> this simple mapping right?
> (global-set-key [?\C-$] (lambda () (??? '£))
> (Please excuse any syntactical errors, I haven't read the 
> elisp manual...)
> Christopher

Any of the following should insert a pound sterling character (i.e. they
work for me):

(insert ?£)

(insert 2211)

(insert ?\x8a3)

The latter two have the advantage of not needing a pound sterling key!

To write an interactive command (rather than just a Lisp function), you will
need something like this:

(global-set-key [?\C-$] (lambda () (interactive "*") (insert 2211)))

Again, this works for me.  But beware that I have a UK setup, so I might
have suggested something non-portable without realising it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]