diff src/keymap.c @ 5693:4d15e903800b

Be more careful about erroring with probable GNU-syntax keysyms, keymap.c src/ChangeLog addition: 2012-11-06 Aidan Kehoe <kehoea@parhasard.net> * keymap.c (define_key_check_and_coerce_keysym): When worrying about GNU Emacs-like keysym syntax, if the symbol name starts with c-whatever (or s-whatever, or m-whatever), check for a function binding for that before erroring. Otherwise command remapping and C mode interact badly, since most of the C mode commands are regarded as GNU Emacs-style keysyms.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 06 Nov 2012 22:33:58 +0000
parents be87f507f510
children f9e4d44504a4
line wrap: on
line diff
--- a/src/keymap.c	Tue Nov 06 22:27:15 2012 +0000
+++ b/src/keymap.c	Tue Nov 06 22:33:58 2012 +0000
@@ -1344,7 +1344,11 @@
 	 sanitize the Sun keyboards, and would make it trickier to
 	 conditionalize a .emacs file for multiple X servers.
 	 */
-      if (((int) qxestrlen (name) >= 2 && name[1] == '-')
+      if (((int) qxestrlen (name) >= 2 && name[1] == '-'
+	   /* Check for a function binding if the symbol looks like
+	      c-..., otherwise command remapping and C mode interact
+	      badly. */
+           && NILP (Ffunctionp (XSYMBOL_FUNCTION (*keysym))))
 #if 1
           ||
 	  /* Ok, this is a bit more dubious - prevent people from doing things