Mercurial > emacs
comparison src/xselect.c @ 5244:c0bd54986550
(x_get_foreign_selection): Use x_catch_errors.
(x_handle_selection_clear): Call prepare_menu_bars.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 23 Dec 1993 01:43:11 +0000 |
parents | 69078817ec92 |
children | 9ff439565145 |
comparison
equal
deleted
inserted
replaced
5243:13cce14b5a0c | 5244:c0bd54986550 |
---|---|
739 rest = Vx_lost_selection_hooks; | 739 rest = Vx_lost_selection_hooks; |
740 if (!EQ (rest, Qunbound)) | 740 if (!EQ (rest, Qunbound)) |
741 { | 741 { |
742 for (; CONSP (rest); rest = Fcdr (rest)) | 742 for (; CONSP (rest); rest = Fcdr (rest)) |
743 call1 (Fcar (rest), selection_symbol); | 743 call1 (Fcar (rest), selection_symbol); |
744 prepare_menu_bars (); | |
744 redisplay_preserve_echo_area (); | 745 redisplay_preserve_echo_area (); |
745 } | 746 } |
746 } | 747 } |
747 } | 748 } |
748 | 749 |
981 type_atom = symbol_to_x_atom (display, XCONS (target_type)->car); | 982 type_atom = symbol_to_x_atom (display, XCONS (target_type)->car); |
982 else | 983 else |
983 type_atom = symbol_to_x_atom (display, target_type); | 984 type_atom = symbol_to_x_atom (display, target_type); |
984 | 985 |
985 BLOCK_INPUT; | 986 BLOCK_INPUT; |
987 x_catch_errors (); | |
986 XConvertSelection (display, selection_atom, type_atom, target_property, | 988 XConvertSelection (display, selection_atom, type_atom, target_property, |
987 requestor_window, requestor_time); | 989 requestor_window, requestor_time); |
988 XFlushQueue (); | 990 XFlushQueue (); |
989 | 991 |
990 /* Prepare to block until the reply has been read. */ | 992 /* Prepare to block until the reply has been read. */ |
995 | 997 |
996 /* This allows quits. Also, don't wait forever. */ | 998 /* This allows quits. Also, don't wait forever. */ |
997 secs = x_selection_timeout / 1000; | 999 secs = x_selection_timeout / 1000; |
998 usecs = (x_selection_timeout % 1000) * 1000; | 1000 usecs = (x_selection_timeout % 1000) * 1000; |
999 wait_reading_process_input (secs, usecs, reading_selection_reply, 0); | 1001 wait_reading_process_input (secs, usecs, reading_selection_reply, 0); |
1002 | |
1003 BLOCK_INPUT; | |
1004 x_check_errors ("Cannot get selection: %s"); | |
1005 x_uncatch_errors (); | |
1006 UNBLOCK_INPUT; | |
1000 | 1007 |
1001 if (NILP (XCONS (reading_selection_reply)->car)) | 1008 if (NILP (XCONS (reading_selection_reply)->car)) |
1002 error ("timed out waiting for reply from selection owner"); | 1009 error ("timed out waiting for reply from selection owner"); |
1003 | 1010 |
1004 /* Otherwise, the selection is waiting for us on the requested property. */ | 1011 /* Otherwise, the selection is waiting for us on the requested property. */ |