unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "B. T. Raven" <ecinmn@peoplepc.com>
Subject: Re: How to bind keys in emacs?
Date: Sat, 24 Dec 2005 06:16:27 GMT	[thread overview]
Message-ID: <%I5rf.9205$3Z.4241@newsread1.news.atl.earthlink.net> (raw)
In-Reply-To: 8764pfe6ku.fsf@thalassa.informatimago.com


"Pascal Bourguignon" <spam@mouse-potato.com> wrote in message
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	other threads:[~2005-12-24  6:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-23  7:38 How to bind keys in emacs? zelzel.zsu
2005-12-23  8:24 ` Pascal Bourguignon
2005-12-23 18:18   ` Cameron Desautels
     [not found]   ` <mailman.20269.1135361990.20277.help-gnu-emacs@gnu.org>
2005-12-23 23:13     ` B. T. Raven
2005-12-23 23:28       ` Pascal Bourguignon
2005-12-24  6:16         ` B. T. Raven [this message]
2005-12-24  7:11           ` Pascal Bourguignon
2005-12-24  8:13         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='%I5rf.9205$3Z.4241@newsread1.news.atl.earthlink.net' \
    --to=ecinmn@peoplepc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).