emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102924: * nsterm.m (keyDown): If ns_


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102924: * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check
Date: Fri, 21 Jan 2011 09:35:30 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102924
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Fri 2011-01-21 09:35:30 +0100
message:
  * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check
  if ns_alternate_modifier is none.
modified:
  src/ChangeLog
  src/nsterm.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-01-20 22:36:12 +0000
+++ b/src/ChangeLog     2011-01-21 08:35:30 +0000
@@ -1,3 +1,8 @@
+2011-01-21  Jan Djärv  <address@hidden>
+
+       * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check
+       if ns_alternate_modifier is none.
+
 2011-01-20  Jan Djärv  <address@hidden>
 
        * unexmacosx.c: Add comment about include order.

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2011-01-19 22:11:33 +0000
+++ b/src/nsterm.m      2011-01-21 08:35:30 +0000
@@ -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];


reply via email to

[Prev in Thread] Current Thread [Next in Thread]