all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs-unicode-2 branch - src/macterm.c function mac_set_unicode_keystroke_event - should it be reverted in cvs?
@ 2007-11-21 16:43 CHENG Gao
  2007-11-22  0:46 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 6+ messages in thread
From: CHENG Gao @ 2007-11-21 16:43 UTC (permalink / raw)
  To: emacs-devel


In src/macterm.c (emacs-unicode-2 branch), function
mac_set_unicode_keystroke_event is as below:

,----
| static void
| mac_set_unicode_keystroke_event (code, buf)
|      UniChar code;
|      struct input_event *buf;
| {
|   int charset_id, c1, c2;
| 
|   if (code < 0x80)
|     {
|       buf->kind = ASCII_KEYSTROKE_EVENT;
|       buf->code = code;
|     }
|   else if (code < 0x100)
|     {
|       if (code < 0xA0)
| 	charset_id = CHARSET_8_BIT_CONTROL;
|       else
| 	charset_id = charset_latin_iso8859_1;
|       buf->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
|       buf->code = MAKE_CHAR (charset_id, code, 0);
|     }
|   else
|     {
|       if (code < 0x2500)
| 	charset_id = charset_mule_unicode_0100_24ff,
| 	  code -= 0x100;
|       else if (code < 0x33FF)
| 	charset_id = charset_mule_unicode_2500_33ff,
| 	  code -= 0x2500;
|       else if (code >= 0xE000)
| 	charset_id = charset_mule_unicode_e000_ffff,
| 	  code -= 0xE000;
|       c1 = (code / 96) + 32, c2 = (code % 96) + 32;
|       buf->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
|       buf->code = MAKE_CHAR (charset_id, c1, c2);
|     }
| }
`----

From reading this group (gmane.emacs.devel) I got impression that this
function is mis-re-introduced and should be reverted to OLD version as
below:

,----
| static void
| mac_set_unicode_keystroke_event (code, buf)
|      UniChar code;
|      struct input_event *buf;
| {
|   int charset_id, c1, c2;
| 
|   if (code < 0x80)
|     buf->kind = ASCII_KEYSTROKE_EVENT;
|   else
|     buf->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
|   buf->code = code;
| }
`----

Is this correct? If so, could you please revert it in cvs.
Considering the situation that TRUNK is buildable and usable in MacOSX,
and emacs-unicode-2 is buildable (with this revert), it may be
meaningful even though Carbon port is *to some extent* deprecated and
declared unsupported. After all, Cocoa port (http://emacs-app.sf.net) is
not officially planned to merge, and Mac port is only one step away from
working.

-- 
Numquam minus solus quam cum solus

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-26 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 16:43 emacs-unicode-2 branch - src/macterm.c function mac_set_unicode_keystroke_event - should it be reverted in cvs? CHENG Gao
2007-11-22  0:46 ` YAMAMOTO Mitsuharu
2007-11-22  3:20   ` William Xu
2007-11-22  8:52     ` YAMAMOTO Mitsuharu
2007-11-22  3:21   ` CHENG Gao
2007-11-26 14:35   ` Ted Zlatanov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.