diff options
Diffstat (limited to 'src/w32select.c')
| -rw-r--r-- | src/w32select.c | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/src/w32select.c b/src/w32select.c index f9bab384062..18694d2d334 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Selection processing for Emacs on the Microsoft W32 API. | 1 | /* Selection processing for Emacs on the Microsoft W32 API. |
| 2 | Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, | 2 | |
| 3 | 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
| 4 | 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -1069,10 +1070,34 @@ syms_of_w32select (void) | |||
| 1069 | 1070 | ||
| 1070 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, | 1071 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, |
| 1071 | doc: /* Coding system for communicating with other programs. | 1072 | doc: /* Coding system for communicating with other programs. |
| 1072 | When sending or receiving text via cut_buffer, selection, and | 1073 | |
| 1073 | clipboard, the text is encoded or decoded by this coding system. | 1074 | For MS-Windows and MS-DOS: |
| 1074 | The default value is the current system default encoding on 9x/Me and | 1075 | When sending or receiving text via selection and clipboard, the text |
| 1075 | `utf-16le-dos' (Unicode) on NT/W2K/XP. */); | 1076 | is encoded or decoded by this coding system. The default value is |
| 1077 | the current system default encoding on 9x/Me, `utf-16le-dos' | ||
| 1078 | \(Unicode) on NT/W2K/XP, and `iso-latin-1-dos' on MS-DOS. | ||
| 1079 | |||
| 1080 | For X Windows: | ||
| 1081 | When sending text via selection and clipboard, if the target | ||
| 1082 | data-type matches with the type of this coding system, it is used | ||
| 1083 | for encoding the text. Otherwise (including the case that this | ||
| 1084 | variable is nil), a proper coding system is used as below: | ||
| 1085 | |||
| 1086 | data-type coding system | ||
| 1087 | --------- ------------- | ||
| 1088 | UTF8_STRING utf-8 | ||
| 1089 | COMPOUND_TEXT compound-text-with-extensions | ||
| 1090 | STRING iso-latin-1 | ||
| 1091 | C_STRING no-conversion | ||
| 1092 | |||
| 1093 | When receiving text, if this coding system is non-nil, it is used | ||
| 1094 | for decoding regardless of the data-type. If this is nil, a | ||
| 1095 | proper coding system is used according to the data-type as above. | ||
| 1096 | |||
| 1097 | See also the documentation of the variable `x-select-request-type' how | ||
| 1098 | to control which data-type to request for receiving text. | ||
| 1099 | |||
| 1100 | The default value is nil. */); | ||
| 1076 | /* The actual value is set dynamically in the dumped Emacs, see | 1101 | /* The actual value is set dynamically in the dumped Emacs, see |
| 1077 | below. */ | 1102 | below. */ |
| 1078 | Vselection_coding_system = Qnil; | 1103 | Vselection_coding_system = Qnil; |
| @@ -1080,9 +1105,9 @@ The default value is the current system default encoding on 9x/Me and | |||
| 1080 | DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, | 1105 | DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, |
| 1081 | doc: /* Coding system for the next communication with other programs. | 1106 | doc: /* Coding system for the next communication with other programs. |
| 1082 | Usually, `selection-coding-system' is used for communicating with | 1107 | Usually, `selection-coding-system' is used for communicating with |
| 1083 | other programs. But, if this variable is set, it is used for the | 1108 | other programs (X Windows clients or MS Windows programs). But, if this |
| 1084 | next communication only. After the communication, this variable is | 1109 | variable is set, it is used for the next communication only. |
| 1085 | set to nil. */); | 1110 | After the communication, this variable is set to nil. */); |
| 1086 | Vnext_selection_coding_system = Qnil; | 1111 | Vnext_selection_coding_system = Qnil; |
| 1087 | 1112 | ||
| 1088 | DEFSYM (QCLIPBOARD, "CLIPBOARD"); | 1113 | DEFSYM (QCLIPBOARD, "CLIPBOARD"); |
| @@ -1123,5 +1148,3 @@ globals_of_w32select (void) | |||
| 1123 | clipboard_owner = create_owner (); | 1148 | clipboard_owner = create_owner (); |
| 1124 | } | 1149 | } |
| 1125 | 1150 | ||
| 1126 | /* arch-tag: c96e9724-5eb1-4dad-be07-289f092fd2af | ||
| 1127 | (do not change this comment) */ | ||