all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: CHENG Gao <chenggao@gmail.com>
To: emacs-devel@gnu.org
Subject: emacs-unicode-2 branch - src/macterm.c function mac_set_unicode_keystroke_event - should it be reverted in cvs?
Date: Thu, 22 Nov 2007 00:43:15 +0800	[thread overview]
Message-ID: <m2pry3a6sc.fsf@news.cyberhut.org> (raw)


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

             reply	other threads:[~2007-11-21 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 16:43 CHENG Gao [this message]
2007-11-22  0:46 ` emacs-unicode-2 branch - src/macterm.c function mac_set_unicode_keystroke_event - should it be reverted in cvs? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pry3a6sc.fsf@news.cyberhut.org \
    --to=chenggao@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.