help-emacs-windows
[Top][All Lists]
Advanced

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

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


From: Christopher G D Tipper
Subject: RE: [h-e-w] insert sterling character
Date: Thu, 01 Jul 2004 20:46:46 +0100

Thanks for all your advice.

The command I put in _emacs in the end was:
(global-set-key [?\C-$] (lambda () (interactive "*") (insert (make-char 'latin-
iso8859-1 163))))

It works.

Christopher

On 1 Jul 2004 at 16:52, Dr Francis J. Wright wrote:

> > Dr Francis J. Wright wrote:
> >
> > > 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)))
> >
> > Couldn't that "*" cause a bit of trouble?
> >
> >      (global-set-key [?\C-$] (lambda () (interactive) (insert 163)))
> >
> > works for me and is a bit simpler.
> >
> > Pete
>
> The "*" just means that Emacs complains a bit sooner if the buffer is
> read-only.  It's not essential; I just feel that it's probably good form to
> include it in any interactive function that will modify the buffer.
>
> I guess 163 is the UK-ASCII code for £ and 2211 is the (current) internal
> Emacs code.  If I enter £ into an Emacs buffer by pressing the £ key on my
> keyboard and then do C-x =, Emacs tells me that the character code is 2211,
> which is why I used that.
>
> Francis
>
>
>

--------------------------------o00o--------------------------------
  "Since light travels faster than sound, isn't that why
   some people appear bright until you hear them speak"
                                          - Steve Wright





reply via email to

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