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

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

Re: Changing key bindings of printable chars


From: Pascal Bourguignon
Subject: Re: Changing key bindings of printable chars
Date: 26 Jun 2004 03:26:11 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

John Paul Wallington <jpw@gnu.org> writes:

> Kevin Rodgers <ihs_4664@yahoo.com> writes:
> 
> >  > Commands needn't be functions -- they could be simple keyboard macros,
> >  > eg:  (global-set-key "Y" "Z")
> >
> > Yes, but that combined with (global-set-key "Z" "Y") to meet Paul's
> > requirements leads to infinite recursion.
> 
> Doh!  I should have paid attention to what Paul asked.

But not:

(global-set-key "Y" (lambda()(interactive"*")(insert "Z")))
(global-set-key "Z" (lambda()(interactive"*")(insert "Y")))
(global-set-key "y" (lambda()(interactive"*")(insert "z")))
(global-set-key "z" (lambda()(interactive"*")(insert "y")))

And note that in anycase, using C-q z gives z and C-q y gives y.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein


reply via email to

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