Mercurial > hg > xemacs-beta
changeset 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 | 7f4c8574a590 |
files | src/ChangeLog src/keymap.c |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Nov 06 22:27:15 2012 +0000 +++ b/src/ChangeLog Tue Nov 06 22:33:58 2012 +0000 @@ -1,3 +1,12 @@ +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. + 2012-11-06 Aidan Kehoe <kehoea@parhasard.net> * keymap.c (event_binding):
--- 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