[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: (global-set-key) vs (define-key)
From: |
Drew Adams |
Subject: |
RE: (global-set-key) vs (define-key) |
Date: |
Thu, 25 Jun 2015 11:14:54 -0700 (PDT) |
> 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...')