unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Daniel Corbe <corbe@corbe.net>, help-gnu-emacs@gnu.org
Subject: RE: (global-set-key) vs (define-key)
Date: Thu, 25 Jun 2015 11:14:54 -0700 (PDT)	[thread overview]
Message-ID: <f1587ee3-6423-4ea8-882a-6da283b12de7@default> (raw)
In-Reply-To: <87wpyr3bqr.fsf@corbe.net>

> I have a suspicion that (define-key) is not allowed to override
> global bindings.  Is that true?

No.  `define-key' binds a key in the keymap you provide it as a
parameter.  `global-set-key' binds a key in the keymap that is
the value of variable `global-map'.

So these are equivalent:

(global-set-key KEY COMMAND)
(define-key global-map KEY COMMAND)

(`C-h f' is your friend, as is `C-h r i...')



  reply	other threads:[~2015-06-25 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 18:05 (global-set-key) vs (define-key) Daniel Corbe
2015-06-25 18:14 ` Drew Adams [this message]
2015-06-25 19:11 ` Michael Heerdegen
     [not found] ` <mailman.5675.1435259510.904.help-gnu-emacs@gnu.org>
2015-06-25 20:28   ` Daniel Corbe

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=f1587ee3-6423-4ea8-882a-6da283b12de7@default \
    --to=drew.adams@oracle.com \
    --cc=corbe@corbe.net \
    --cc=help-gnu-emacs@gnu.org \
    /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).