From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: Unicode support for the MS Windows clipboard [new patch] Date: Wed, 08 Sep 2004 14:11:05 -0700 (PDT) Organization: Sony Electronics Inc. Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20040908.141105.01368032.Takaaki.Ota@am.sony.com> References: <20040827.100646.45117880.Takaaki.Ota@am.sony.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1094677961 21856 80.91.224.253 (8 Sep 2004 21:12:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Sep 2004 21:12:41 +0000 (UTC) Cc: eliz@gnu.org, handa@m17n.org, jasonr@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 08 23:12:19 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C59jn-00038K-00 for ; Wed, 08 Sep 2004 23:12:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C59p5-0007se-6u for ged-emacs-devel@m.gmane.org; Wed, 08 Sep 2004 17:17:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C59ou-0007rZ-Ti for emacs-devel@gnu.org; Wed, 08 Sep 2004 17:17:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C59ot-0007rB-V8 for emacs-devel@gnu.org; Wed, 08 Sep 2004 17:17:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C59ot-0007r1-Pi for emacs-devel@gnu.org; Wed, 08 Sep 2004 17:17:35 -0400 Original-Received: from [160.33.82.68] (helo=mail1.fw-sj.sony.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C59j1-0001bd-FU; Wed, 08 Sep 2004 17:11:31 -0400 Original-Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211]) by mail1.fw-sj.sony.com (8.12.11/8.12.11) with ESMTP id i88LB6OV014563; Wed, 8 Sep 2004 21:11:11 GMT Original-Received: from localhost ([43.191.18.96]) by mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id i88LB667029579; Wed, 8 Sep 2004 21:11:06 GMT Original-To: Benjamin.Riefenstahl@epost.de In-Reply-To: X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew-4.0.69 on Emacs-21.3.50.1 (i386-mingw-nt5.1.2600) of 2004-09-07 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26900 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26900 I have confirmed both mingw build and MSVC build work fine in copying and pasting unicode characters back and forth between emacs and windoze application. If there is no issues about this patch could someone check it into CVS please. Thanks. -Tak Mon, 30 Aug 2004 22:47:46 +0200: Benjamin Riefenstahl wrote: > Hi all, > > Benjamin Riefenstahl writes: > > I will fix the atexit() bit and see what I can do in terms of docs. > > See attached patch. > > I have kept the documentation rather high-level, because users > shouldn't need to do anything, the defaults are fine. A more detailed > documentation would have to go into the ELisp manual IMO. > > benny > > > 2004-08-30 Benjamin Riefenstahl > > * w32select.c: Summary: Thorough rework to implement Unicode > clipboard operations and delayed rendering. > > Drop last_clipboard_text and related code, keep track of > ownership via clipboard_owner instead. Drop old #if0 > sections. > > (DEFAULT_LCID, ANSICP, OEMCP, QUNICODE, QANSICP, QOEMCP) > (clipboard_owner, modifying_clipboard, cfg_coding_system) > (cfg_codepage, cfg_lcid, cfg_clipboard_type, current_text) > (current_coding_system, current_requires_encoding) > (current_num_nls, current_clipboard_type, current_lcid): New > static variables. > > (convert_to_handle_as_ascii, convert_to_handle_as_coded) > (render, render_all, run_protected, lisp_error_handler) > (owner_callback, create_owner, setup_config) > (enum_locale_callback, cp_from_locale, coding_from_cp): New > local functions. > > (term_w32select, globals_of_w32select): New global functions. > > (Fw32_set_clipboard_data): Ignore parameter FRAME, use > clipboard_owner instead. Use delayed rendering and provide > all text formats. Provide CF_LOCALE if necessary. > > (Fw32_get_clipboard_data): Handle CF_UNICODETEXT and > CF_LOCALE. Fall back to CF_TEXT, if CF_UNICODETEXT is not > available. Force DOS line-ends for decoding. > > (Fx_selection_exists_p): Handle CF_UNICODETEXT. > > (syms_of_w32select): Init and register new variables. > > * w32.h: Add prototypes for globals_of_w32select and > term_w32select. Make the neighboring K&R declarations into > prototypes, too. > > * emacs.c: Include w32.h to get function prototypes. > (main): Call globals_of_w32select. > > * w32.c (term_ntproc): Call term_w32select. > > * mule-cmds.el (set-locale-environment): Remove call to > set-selection-coding-system on Windows. > > * s/ms-w32.h: Guard MSC-specific #pragmas with an #ifdef. > >