OK. There were some *very* silly problems, especially in the
X code, which was attempting to hack with selection-alist
(an internal variable of select.c). I *think* this should
solve most of the problems I've been hearing about. In
particular, the _EMACS_INTERNAL selection type has gone,
for good I hope. I haven't tested it on X yet (will do, as
soon as I download a new set of sources from the
repository) - apologies for this, but I know it works (and
fixes a few things) on Windows, so I'll send it out *now*
and then have another go at building on X.
The new selection code is still a work in progress - there
are several things still to do as far as I can see; next on
the list is a set of functions for encoding and decoding
binary data, so that the existing code in select-x.c that
decodes the binary data can be moved into Lisp, where it
belongs.
Regards,
Alastair.
lisp/ChangeLog:
2000-07-15 Alastair J. Houghton <ajhoughton(a)lineone.net>
* select.el (select-convert-from-text): New.
* select.el (select-convert-from-length): New.
* select.el (select-convert-from-integer): New.
* select.el (select-convert-from-identity): New.
* select.el (select-convert-from-filename): New.
* select.el (selection-converter-in-alist): Use them.
New converter functions for X.
* select.el (get-selection): Removed comment.
* select.el (own-selection): Removed append code - I thought
I'd already done this, but apparently not...
* select.el: Changed comment about TIMESTAMP.
* select.el (select-convert-in): New.
* select.el (select-convert-out): New.
New functions that get used by select.c.
* select.el (select-buffer-killed-default): New.
* select.el (select-buffer-killed-text): New.
* select.el (selection-buffer-killed-alist): New.
New list and functions that get called if a relevant selection
exists and a buffer gets killed.
* select.el (select-convert-to-targets):
* select.el (select-convert-to-identity): Removed.
* select.el (select-convert-from-identity): Removed.
* select.el (select-converter-out-alist):
Removed _EMACS_INTERNAL selection type.
* x-select.el (xselect-kill-buffer-hook): Removed.
* x-select.el (xselect-kill-buffer-hook-1): Removed.
Removed this X-specific nonesense. Use the generic support
in select.el instead.
src/ChangeLog:
2000-07-15 Alastair J. Houghton <ajhoughton(a)lineone.net>
* select.h (selection-alist): Removed declaration.
* select.h (get_local_selection):
* select.c (get_local_selection):
Made static.
* select.h (convert_selection): Removed declaration.
* select.c (convert_selection): Removed.
This function belongs in Lisp.
* select.h (select_convert_in): Declare.
* select.h (select_convert_out): Declare.
* select.c (select_convert_in): New.
* select.c (select_convert_out): New.
New conversion functions for other files to call.
* select.h (select_notify_buffer_kill): Declare.
* select.c (select_notify_buffer_kill): New.
New functions that get called from kill-buffer.
* buffer.c (kill-buffer): Call select_notify_buffer_kill, rather than
X-specific lisp code.
* select.h: Declare some of the lisp-visible functions for
external use.
* select.c (clean_local_selection_data): Removed. This was
a disgusting function, and previously should have been in
select-x.c in any case. The functionality is now provided
in select-convert-from-integer (select.el).
* select.c (available-selection-types): Fixed stupidity where
INTEGER and ATOM got added twice. Also add STRING when we see an
extent.
* select.c (get-selection-internal): Removed symbol stripping. No
longer causes conversion when data comes from the internal cache.
* select.c (syms_of_select): Added new functions.
* select-x.c (motif_clipboard_cb): Use select_convert_out. Rewrote
error checking - previously this called abort!
* select-x.c (x_own_selection): Changed comment.
* select-x.c (x_handle_selection_request): Use select_convert_out.
Don't mess with selection-alist; it's an internal variable of select.c.
* select-x.c (x_get_foreign_selection): Use select_convert_in.
* select-x.c (x_handle_selection_clear): Use get-selection-timestamp,
rather than messing with selection-alist.
* select-msw.c (mswindows_get_foreign_selection):
Use TO_INTERNAL_FORMAT rather than hacking.
--
____________________________________________________________
Alastair Houghton ajhoughton(a)lineone.net