I found the doc string for define-key a bit strange. It kind of suggests
that if the keymap is not sparse then it is not changed. I suggest the
following patch:
Index: keymap.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/keymap.c,v
retrieving revision 1.306
diff -u -r1.306 keymap.c
--- keymap.c 7 Aug 2005 12:33:17 -0000 1.306
+++ keymap.c 10 Aug 2005 19:42:37 -0000
@@ -1105,9 +1105,8 @@
(DEFN should be a valid definition in its own right),
or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP.
-If KEYMAP is a sparse keymap with a binding for KEY, the existing
-binding is altered. If there is no binding for KEY, the new pair
-binding KEY to DEF is added at the front of KEYMAP. */)
+If KEYMAP is a sparse keymap and there is no binding for KEY, the new
+pair binding KEY to DEF is added at the front of KEYMAP. */)
(keymap, key, def)
Lisp_Object keymap;
Lisp_Object key;
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel