[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bindings.el grabs C-c
From: |
Luc Teirlinck |
Subject: |
Re: bindings.el grabs C-c |
Date: |
Fri, 17 Oct 2003 13:02:08 -0500 (CDT) |
Deepak Goel wrote:
emacs -q -no-site-file
* Bind
(global-set-key "\C-ca" 'beginning-of-line)
.. it works..
* (load "bindings.el")
* The C-c a bound above stops working.
That is because bindings.el contains:
(defalias 'mode-specific-command-prefix (make-sparse-keymap))
(defvar mode-specific-map (symbol-function 'mode-specific-command-prefix)
"Keymap for characters following C-c.")
(define-key global-map "\C-c" 'mode-specific-command-prefix)
The first line is the only relevant one. I pasted the others for
context. Clearly, the keymap containing your C-c a binding is no
longer associated with C-c, which has a fresh keymap now, "thanks to"
that first line. Is this a bug, however? Why would one want to
reload "bindings.el" other than to reinitialize?
If it would be considered a bug, I guess one could do something style:
(unless (fboundp 'mode-specific-command-prefix)
...
or similar. (Maybe throw in an extra keymapp, whatever.) Again, I am
not immediately completely sure that it should be considered a bug,
however.
Sincerely,
Luc.