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

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

Re: How to bind keys in emacs?


From: B. T. Raven
Subject: Re: How to bind keys in emacs?
Date: Sat, 24 Dec 2005 06:16:27 GMT

"Pascal Bourguignon" <spam@mouse-potato.com> wrote in message
8764pfe6ku.fsf@thalassa.informatimago.com">news:8764pfe6ku.fsf@thalassa.informatimago.com...
> "B. T. Raven" <ecinmn@peoplepc.com> writes:
>
> > "Cameron Desautels" <cam@apt2324.com> wrote in message
> > news:mailman.20269.1135361990.20277.help-gnu-emacs@gnu.org...
> >> On Fri, Dec 23, 2005 at 09:24:34AM +0100, Pascal Bourguignon wrote:
> >> > > I want to use F5 keys to serve as C-x C-s [save buffer].
> >> > > and  use F5 keys to serve as C-z [suspend].
> >> > >
> >> > > What should i write in my ~/.emacs?
> >> >
> >> > If find it strange that you have non-deterministics wants, but here
> > you are:
> >>
> >> Hah.  I think that was a typo.  I think he wants [f5] as save-buffer
> >> and [f6] as suspend.  Like so:
> >>
> >> (global-set-key [f5] 'save-buffer)
> >> (global-set-key [f6] 'suspend-emacs)
> >> --
> >> Cameron Desautels <cam@apt2324.com>
> >>
> >>
> >> Given infinite time, 100 monkeys could type out the complete works of
> >> Shakespeare.  Win 98 source code? Eight monkeys, five minutes.
> >>
> >>
> >
> >  Or 'iconify-or-deiconify-frame for w32, apparently, instead of
> > 'suspend-emacs. I don't know why this is. Do both work under Linux?
>
> Why do you think I wrote:
>                                    (if window-system
>                                        (iconify-or-deiconify-frame)
>                                        (suspend-emacs))
>
> ?

Why do you think I wrote "I don't know why this is":
??
In fact, when I read your code I really didn't understand it. All I did
was identify what was happening with C-z on my (w32) machine. Also I read
that suspend-emacs "makes no sense" in a window environment. Now I know
that window-system can take a value of 'x in addition to 'w32 or nil
(terminal?). I suppose I was flummoxed by the (to my mind) infelicitous
(oddp (random... statement. I don't have oddp or evenp here. Would the op
have learned something if she had obediently added your code to her .emacs
or would he (!) just have seen "Debugger entered--Lisp error:
(void-function oddp)?" Anyway (as we all know) every tyro (randomly male
or female) has certain indeterminate needs.

Ed



reply via email to

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