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: Mon, 07 Feb 2005 16:49:27 -0800 (PST) Organization: Sony Electronics Inc. Message-ID: <20050207.164927.03431103.Takaaki.Ota@am.sony.com> References: 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 1107824068 11276 80.91.229.6 (8 Feb 2005 00:54:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Feb 2005 00:54:28 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 08 01:54:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CyJe1-0007wA-00 for ; Tue, 08 Feb 2005 01:54:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyJsF-0005Ek-Rc for ged-emacs-devel@m.gmane.org; Mon, 07 Feb 2005 20:09:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CyJp6-0003CM-CA for emacs-devel@gnu.org; Mon, 07 Feb 2005 20:05:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CyJp3-0003A4-FE for emacs-devel@gnu.org; Mon, 07 Feb 2005 20:05:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyJmK-00024s-Lx for emacs-devel@gnu.org; Mon, 07 Feb 2005 20:02:56 -0500 Original-Received: from [160.33.98.75] (helo=mail8.fw-bc.sony.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CyJZL-0005vn-Qq for emacs-devel@gnu.org; Mon, 07 Feb 2005 19:49:32 -0500 Original-Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211]) by mail8.fw-bc.sony.com (8.12.11/8.12.11) with ESMTP id j180nOe3027520 for ; Tue, 8 Feb 2005 00:49:24 GMT Original-Received: from localhost (us00e098d0e811.am.sony.com [43.191.36.105]) by mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id j180nRj9024029 for ; Tue, 8 Feb 2005 00:49:28 GMT Original-To: emacs-devel@gnu.org 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.2rc2 on Emacs-21.3.50.1 (i386-mingw-nt5.1.2600) of 2005-01-20 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:33066 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33066 Is there any reason why this patch cannot make into CVS? I really wish it be a part of the next release. -Tak Mon, 08 Nov 2004 18:24:44 +0100: Benjamin Riefenstahl wrote: > Hi all, > > > Now that my papers are in order (;-)), here is a new version of the > much discussed patch to support the Unicode clipboard on Windows > (attached). > > Notes: > > - I didn't provide user-level documentation except a short mention in > etc/NEWS. The defaults should work fine and there should be less > need to customize this than on X11. > > - There is a short discussion of the use of the customization in > comments in the code. Something similar may be usefull in the ELisp > manual, probably in "Window System Selections." > > > benny > > > 2004-11-08 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. > > >