# HG changeset patch # User Jan D. # Date 1295598930 -3600 # Node ID f1de024f822c7ef3a1d929e820d0e6d0bbbc4de2 # Parent 23a54fb18e67cfd66ffaea28ffde20eb45797831 * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check if ns_alternate_modifier is none. diff -r 23a54fb18e67 -r f1de024f822c src/ChangeLog --- a/src/ChangeLog Thu Jan 20 22:54:37 2011 -0600 +++ b/src/ChangeLog Fri Jan 21 09:35:30 2011 +0100 @@ -1,3 +1,8 @@ +2011-01-21 Jan Djärv + + * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check + if ns_alternate_modifier is none. + 2011-01-20 Jan Djärv * unexmacosx.c: Add comment about include order. diff -r 23a54fb18e67 -r f1de024f822c src/nsterm.m --- a/src/nsterm.m Thu Jan 20 22:54:37 2011 -0600 +++ b/src/nsterm.m Fri Jan 21 09:35:30 2011 +0100 @@ -4388,6 +4388,7 @@ int flags; static NSMutableArray *nsEvArray; static BOOL firstTime = YES; + int left_is_none; NSTRACE (keyDown); @@ -4511,10 +4512,14 @@ emacs_event->modifiers |= parse_solitary_modifier (ns_function_modifier); + left_is_none = NILP (ns_alternate_modifier) + || EQ (ns_alternate_modifier, Qnone); + if ((flags & NSRightAlternateKeyMask) == NSRightAlternateKeyMask) { if ((NILP (ns_right_alternate_modifier) - || EQ (ns_right_alternate_modifier, Qnone)) + || EQ (ns_right_alternate_modifier, Qnone) + || (EQ (ns_right_alternate_modifier, Qleft) && left_is_none)) && !fnKeysym) { /* accept pre-interp alt comb */ if ([[theEvent characters] length] > 0) @@ -4532,9 +4537,7 @@ if ((flags & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask) /* default = meta */ { - if ((NILP (ns_alternate_modifier) - || EQ (ns_alternate_modifier, Qnone)) - && !fnKeysym) + if (left_is_none && !fnKeysym) { /* accept pre-interp alt comb */ if ([[theEvent characters] length] > 0) code = [[theEvent characters] characterAtIndex: 0];