From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10299: Emacs doesn't handle Unicode characters in keyboard layout on MS Windows Date: Mon, 23 Jan 2012 20:35:17 -0500 Message-ID: References: <8739clgapc.fsf@gnu.org> <83zket20xw.fsf@gnu.org> <83vcph0w9t.fsf@gnu.org> <83obv821wv.fsf@gnu.org> <831us31atj.fsf@gnu.org> <83pqflzr1d.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327368958 1119 80.91.229.12 (24 Jan 2012 01:35:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2012 01:35:58 +0000 (UTC) Cc: 10299@debbugs.gnu.org To: Joakim =?UTF-8?Q?H=C3=A5rsman?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 24 02:35:52 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RpVIe-00025g-5D for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jan 2012 02:35:52 +0100 Original-Received: from localhost ([::1]:37439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpVId-0003hI-JZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Jan 2012 20:35:51 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpVIa-0003gx-1Y for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2012 20:35:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpVIY-0008NY-2V for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2012 20:35:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpVIX-0008NS-Vs for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2012 20:35:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RpVIo-0007fy-PG for bug-gnu-emacs@gnu.org; Mon, 23 Jan 2012 20:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Jan 2012 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10299 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10299-submit@debbugs.gnu.org id=B10299.132736894429478 (code B ref 10299); Tue, 24 Jan 2012 01:36:02 +0000 Original-Received: (at 10299) by debbugs.gnu.org; 24 Jan 2012 01:35:44 +0000 Original-Received: from localhost ([127.0.0.1]:41139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpVIV-0007fP-Ql for submit@debbugs.gnu.org; Mon, 23 Jan 2012 20:35:44 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:47823) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpVIT-0007fC-Om for 10299@debbugs.gnu.org; Mon, 23 Jan 2012 20:35:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EAIIJHk9MCos2/2dsb2JhbABCq32CLIEGgXIBAQQBViMFCwstBxIUGA0QAROID7heiH6DKASIO5pzhFc X-IronPort-AV: E=Sophos;i="4.71,559,1320642000"; d="scan'208";a="158385321" Original-Received: from 76-10-139-54.dsl.teksavvy.com (HELO ceviche.home) ([76.10.139.54]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jan 2012 20:35:18 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id F3217660FE; Mon, 23 Jan 2012 20:35:17 -0500 (EST) In-Reply-To: ("Joakim =?UTF-8?Q?H=C3=A5rsman?="'s message of "Mon, 23 Jan 2012 20:15:15 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55939 Archived-At: > I've amended the patch to take your comments into account. Thank you. > --- src/w32.h 2011-10-28 09:54:02 +0000 > +++ src/w32.h 2012-01-23 19:10:04 +0000 > @@ -159,5 +159,18 @@ > const void* buf, size_t sz); > #endif /* HAVE_GNUTLS */ > +#define INIT_WINDOW_CLASS(wc) \ > + wc.style = CS_HREDRAW | CS_VREDRAW; \ > + wc.lpfnWndProc = (WNDPROC) w32_wnd_proc; \ > + wc.cbClsExtra = 0; \ > + wc.cbWndExtra = WND_EXTRA_BYTES; \ > + wc.hInstance = hinst; \ > + wc.hIcon = LoadIcon (hinst, EMACS_CLASS); \ > + wc.hCursor = w32_load_cursor (IDC_ARROW); \ > + wc.hbrBackground = NULL; \ > + wc.lpszMenuName = NULL; \ > + > + > + > #endif /* EMACS_W32_H */ Please don't put this macro there: it's not something that's exported to other files, so it is better to keep it close to where it's used. > +/* Set text of w32 frame with handle HWND to TEXT. > + > + We explicitly switch between the Unicode and ANSI version of > + SetWindowText because Emacs isn't compiled with UNICODE defined to > + retain compatibility with Windows 95. */ > + > +void > +w32_set_frame_text(HWND hwnd, LPCSTR text) This should be `static', I think, and with a space before the open-paren. > + if (os_subtype == OS_NT) > + result = GetMessageW (&msg, NULL, 0, 0); > + else > + result = GetMessage (&msg, NULL, 0, 0); I'd write it as follows: result = (os_subtype == OS_NT ? GetMessageW : GetMessage) (&msg, NULL, 0, 0); other than that, the code looks fine for me (I'll let Windows users assess whether it actually does what it's meant to do ;-), Stefan