summaryrefslogtreecommitdiff
path: root/src/xselect.c
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-02-19 00:06:48 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-02-19 00:06:48 +0000
commit60c73d2ed638e5d51643c65a0fc6dea618fc72c8 (patch)
tree3d9e0adc703f9cfd5df162c66ac15999c4106738 /src/xselect.c
parentc20213c90736fc9c2a6eca2ca44d6e200dbf5efe (diff)
parent8a59305430c68ee23d3cc7ab7487ab3acebdbe7f (diff)
downloademacs-60c73d2ed638e5d51643c65a0fc6dea618fc72c8.tar.gz
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.c20
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,
}
else if (STRINGP (obj))
{
- xassert (! STRING_MULTIBYTE (obj));
+ if (SCHARS (obj) < SBYTES (obj))
+ /* OBJ is a multibyte string containing a non-ASCII char. */
+ Fsignal (Qerror, /* Qselection_error */
+ Fcons (build_string
+ ("Non-ASCII string must be encoded in advance"),
+ Fcons (obj, Qnil)));
if (NILP (type))
type = QSTRING;
*format_ret = 8;
@@ -2201,7 +2206,10 @@ Disowning it means there is no such selection. */)
{
Time timestamp;
Atom selection_atom;
- struct selection_input_event event;
+ union {
+ struct selection_input_event sie;
+ struct input_event ie;
+ } event;
Display *display;
struct x_display_info *dpyinfo;
struct frame *sf = SELECTED_FRAME ();
@@ -2232,10 +2240,10 @@ Disowning it means there is no such selection. */)
the selection owner to None. The NCD server does, the MIT Sun4 server
doesn't. So we synthesize one; this means we might get two, but
that's ok, because the second one won't have any effect. */
- SELECTION_EVENT_DISPLAY (&event) = display;
- SELECTION_EVENT_SELECTION (&event) = selection_atom;
- SELECTION_EVENT_TIME (&event) = timestamp;
- x_handle_selection_clear ((struct input_event *) &event);
+ SELECTION_EVENT_DISPLAY (&event.sie) = display;
+ SELECTION_EVENT_SELECTION (&event.sie) = selection_atom;
+ SELECTION_EVENT_TIME (&event.sie) = timestamp;
+ x_handle_selection_clear (&event.ie);
return Qt;
}