]> code.delx.au - gnu-emacs/blobdiff - src/macterm.c
(regexp-opt-group): Compute HALF2 properly.
[gnu-emacs] / src / macterm.c
index d229952436262017d1157106a4c7442a809483fd..cae4172854e6a3c2683eb7e638a706b7fb890073 100644 (file)
@@ -12931,26 +12931,19 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
              bufp->code = 0xff00 | xkeysym;
              bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
            }      
-         else if (!NILP (Vmac_reverse_ctrl_meta) && (er.modifiers & controlKey))
-           {
-             /* This is a special case to deal with converting from
-                a control character to non-control character */
-             int new_modifiers = er.modifiers & ~controlKey;
-             int new_keycode = keycode | new_modifiers;              
-             Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
-             unsigned long some_state = 0;
-             bufp->code = KeyTranslate (kchr_ptr, new_keycode, &some_state) & 0xff;
-             bufp->kind = ASCII_KEYSTROKE_EVENT;
-           }
          else
            {
-             if (er.modifiers & macMetaKey)
+             if (er.modifiers & (controlKey | 
+                                 (NILP (Vmac_command_key_is_meta) ? optionKey 
+                                  : cmdKey)))
                {
                  /* This code comes from Keyboard Resource, Appendix
                     C of IM - Text.  This is necessary since shift is
                     ignored in KCHR table translation when option or
-                    command is pressed. */
-                 int new_modifiers = er.modifiers & 0xf600;
+                    command is pressed.  It also does not translate 
+                    correctly control-shift chars like C-% so mask off
+                    shift here also */
+                 int new_modifiers = er.modifiers & 0xe600;
                  /* mask off option and command */
                  int new_keycode = keycode | new_modifiers;
                  Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
@@ -13700,6 +13693,8 @@ syms_of_macterm ()
   x_error_message_string = Qnil;
 #endif
 
+  Fprovide (intern ("mac-carbon"), Qnil);
+
   staticpro (&x_display_name_list);
   x_display_name_list = Qnil;
 
@@ -13767,7 +13762,7 @@ Otherwise the option key is used.  */);
    doc: /* Non-nil means that the wheel button will be treated as mouse-2 and
 the right click will be mouse-3.
 Otherwise, the right click will be mouse-2 and the wheel button mouse-3.*/);
-  Vmac_wheel_button_is_mouse_2 = Qnil;
+  Vmac_wheel_button_is_mouse_2 = Qt;
 
   DEFVAR_LISP ("mac-pass-command-to-system", &Vmac_pass_command_to_system,
    doc: /* If non-nil, the Mac \"Command\" key is passed on to the Mac