Carbon.

Aidan Kehoe kehoea at parhasard.net
Tue Oct 2 05:09:31 EDT 2007


 Ar an chéad lá de mí Deireadh Fómhair, scríobh Rodney Sparapani: 

 > But, it looks like you incorporated the patch event-carbon.c.diff on
 > http://members.shaw.ca/akochoi-xemacs/Old%20Website/index.html
 > 
 > I don't think this is a good idea. 

Well you’re talking to the wrong person if you want a patch that adds
comprehensive Unicode input support backed out :-) . 

 > Carbon Emacs and Aquamacs allow you to use the Option key as Meta. That
 > way you can still use the Apple key for Mac OS purposes. However, after
 > this patch, you can't. The Apple key becomes the Meta key and there
 > doesn't seem to be an easy way to change the code. There was a discussion
 > of this and a patch way back when, but I can't find either at the moment. 
 > And, IIRC, the original patch gets broken by this latter patch as well as
 > one that comes even later; maybe event-carbon2.c.diff?

http://groups.google.com/groups?selm=m2wtsw9w1u.fsf@Owlbear.local describes
his motivations for not adding the mac-command-key-is-meta behaviour. Here’s
the trivial change he mentions; if you apply it locally and set
mac-command-key-is-meta to t, do you get the behaviour you want? 

--- event-carbon.c~	2007-10-02 11:00:35.843750000 +0200
+++ event-carbon.c	2007-10-02 11:06:23.875000000 +0200
@@ -37,6 +37,9 @@
 extern SELECT_TYPE process_only_mask;  /* From event-unixoid.c.  */
 extern int track_mouse_down_on_scrollbar (void);  /* from scrollbar-carbon.c.  */
 
+/* true if using command key as meta key */
+Lisp_Object Vmac_command_key_is_meta;
+
 static struct event_stream *carbon_event_stream;
 
 static Lisp_Object carbon_user_event_queue;
@@ -250,7 +253,7 @@
 {
   int emacs_modifiers = 0;
   
-  if (modifiers & cmdKey)
+  if (modifiers & (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey))
     emacs_modifiers |= XEMACS_MOD_META;
   if (modifiers & controlKey)
     emacs_modifiers |= XEMACS_MOD_CONTROL;
@@ -922,6 +925,10 @@
 vars_of_event_carbon (void)
 {
   /* reinit_vars_of_event_carbon (); */
+  DEFVAR_LISP ("mac-command-key-is-meta", &Vmac_command_key_is_meta, /*
+Non-nil means that the command key is used as the XEmacs meta key.
+Otherwise the option key is used.  */ );
+  Vmac_command_key_is_meta = Qt;
 }
 
 void


-- 
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)



More information about the XEmacs-Beta mailing list