diff options
| author | Karoly Lorentey | 2005-02-19 00:06:48 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-02-19 00:06:48 +0000 |
| commit | 60c73d2ed638e5d51643c65a0fc6dea618fc72c8 (patch) | |
| tree | 3d9e0adc703f9cfd5df162c66ac15999c4106738 /src/xselect.c | |
| parent | c20213c90736fc9c2a6eca2ca44d6e200dbf5efe (diff) | |
| parent | 8a59305430c68ee23d3cc7ab7487ab3acebdbe7f (diff) | |
| download | emacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.tar.gz emacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 14-16, 95-106)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-95
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-96
Move Gnus images into etc/images
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-97
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-98
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-99
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-100
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-101
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-102
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-103
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-104
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-106
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-14
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-15
Update from CVS: lisp/imap.el (imap-log): Doc fix.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-16
Merge from emacs--cvs-trunk--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-295
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/xselect.c b/src/xselect.c index adea1f3c2d6..5a899cfa389 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1925,7 +1925,12 @@ lisp_data_to_selection_data (display, obj, | |||
| 1925 | } | 1925 | } |
| 1926 | else if (STRINGP (obj)) | 1926 | else if (STRINGP (obj)) |
| 1927 | { | 1927 | { |
| 1928 | xassert (! STRING_MULTIBYTE (obj)); | 1928 | if (SCHARS (obj) < SBYTES (obj)) |
| 1929 | /* OBJ is a multibyte string containing a non-ASCII char. */ | ||
| 1930 | Fsignal (Qerror, /* Qselection_error */ | ||
| 1931 | Fcons (build_string | ||
| 1932 | ("Non-ASCII string must be encoded in advance"), | ||
| 1933 | Fcons (obj, Qnil))); | ||
| 1929 | if (NILP (type)) | 1934 | if (NILP (type)) |
| 1930 | type = QSTRING; | 1935 | type = QSTRING; |
| 1931 | *format_ret = 8; | 1936 | *format_ret = 8; |
| @@ -2201,7 +2206,10 @@ Disowning it means there is no such selection. */) | |||
| 2201 | { | 2206 | { |
| 2202 | Time timestamp; | 2207 | Time timestamp; |
| 2203 | Atom selection_atom; | 2208 | Atom selection_atom; |
| 2204 | struct selection_input_event event; | 2209 | union { |
| 2210 | struct selection_input_event sie; | ||
| 2211 | struct input_event ie; | ||
| 2212 | } event; | ||
| 2205 | Display *display; | 2213 | Display *display; |
| 2206 | struct x_display_info *dpyinfo; | 2214 | struct x_display_info *dpyinfo; |
| 2207 | struct frame *sf = SELECTED_FRAME (); | 2215 | struct frame *sf = SELECTED_FRAME (); |
| @@ -2232,10 +2240,10 @@ Disowning it means there is no such selection. */) | |||
| 2232 | the selection owner to None. The NCD server does, the MIT Sun4 server | 2240 | the selection owner to None. The NCD server does, the MIT Sun4 server |
| 2233 | doesn't. So we synthesize one; this means we might get two, but | 2241 | doesn't. So we synthesize one; this means we might get two, but |
| 2234 | that's ok, because the second one won't have any effect. */ | 2242 | that's ok, because the second one won't have any effect. */ |
| 2235 | SELECTION_EVENT_DISPLAY (&event) = display; | 2243 | SELECTION_EVENT_DISPLAY (&event.sie) = display; |
| 2236 | SELECTION_EVENT_SELECTION (&event) = selection_atom; | 2244 | SELECTION_EVENT_SELECTION (&event.sie) = selection_atom; |
| 2237 | SELECTION_EVENT_TIME (&event) = timestamp; | 2245 | SELECTION_EVENT_TIME (&event.sie) = timestamp; |
| 2238 | x_handle_selection_clear ((struct input_event *) &event); | 2246 | x_handle_selection_clear (&event.ie); |
| 2239 | 2247 | ||
| 2240 | return Qt; | 2248 | return Qt; |
| 2241 | } | 2249 | } |