[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch for selection in Carbon Emacs
From: |
YAMAMOTO Mitsuharu |
Subject: |
Patch for selection in Carbon Emacs |
Date: |
Mon, 11 Apr 2005 19:46:26 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
The attached is a patch for selection/clipboard in Carbon Emacs.
* Addresses the following bugs:
[Emacs/Carbon/Mac OS X] clipboard-coding-system affects internal kill&yank
http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00133.html
[osx] edit/paste menu item always disabled
http://lists.gnu.org/archive/html/emacs-devel/2004-10/msg00101.html
* Supports Unicode data in clipboard
Selection-coding-system also affects pasting Unicode data from the
clipboard. First, the clipboard data is converted to the data
encoded in selection-coding-system *using the converter provided
by the system*, and then Emacs decodes its result with
selection-coding-system. If the first conversion failed, then
Emacs decodes the original clipboard data as UTF-16 data. I did
so in order to avoid subtle difference between Unicode mappings.
As in other platforms, selection names are specified by Lisp symbols.
But unlike X11, not all selection names take part in interapplication
communication. If a selection name has a string value for the
property `mac-scrap-name', then the data exchange with the selection
becomes that with the scrap (an interapplication storage in Mac) whose
name is the string. For example, mac-win.el has the following line:
(put 'CLIPBOARD 'mac-scrap-name "com.apple.scrap.clipboard")
and thus the selection CLIPBOARD corresponds to the standard
clipboard, which is a scrap named "com.apple.scrap.clipboard".
Neither PRIMARY nor SECONDARY is associated with a scrap by default,
so they are used inside Emacs only.
Selection data types and scrap flavor types are related in a similar
way:
(put 'mac-TEXT 'mac-scrap-flavor-type "TEXT")
(put 'mac-UNICODE 'mac-scrap-flavor-type "utxt")
YAMAMOTO Mitsuharu
address@hidden
diff-selection.gz
Description: Binary data
- Patch for selection in Carbon Emacs,
YAMAMOTO Mitsuharu <=