comparison src/select-x.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents da8ed4261e83
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
1490 FROB (XA_CUT_BUFFER7); 1490 FROB (XA_CUT_BUFFER7);
1491 #undef FROB 1491 #undef FROB
1492 cut_buffers_initialized = 1; 1492 cut_buffers_initialized = 1;
1493 } 1493 }
1494 1494
1495 #define CHECK_CUTBUFFER(symbol) \ 1495 #define CHECK_CUTBUFFER(symbol) do { \
1496 { CHECK_SYMBOL (symbol); \ 1496 CHECK_SYMBOL (symbol); \
1497 if (!EQ((symbol),QCUT_BUFFER0) && !EQ((symbol),QCUT_BUFFER1) && \ 1497 if (! (EQ (symbol, QCUT_BUFFER0) || \
1498 !EQ((symbol),QCUT_BUFFER2) && !EQ((symbol),QCUT_BUFFER3) && \ 1498 EQ (symbol, QCUT_BUFFER1) || \
1499 !EQ((symbol),QCUT_BUFFER4) && !EQ((symbol),QCUT_BUFFER5) && \ 1499 EQ (symbol, QCUT_BUFFER2) || \
1500 !EQ((symbol),QCUT_BUFFER6) && !EQ((symbol),QCUT_BUFFER7)) \ 1500 EQ (symbol, QCUT_BUFFER3) || \
1501 signal_error (Qerror, list2 (build_string ("Doesn't name a cutbuffer"), \ 1501 EQ (symbol, QCUT_BUFFER4) || \
1502 (symbol))); \ 1502 EQ (symbol, QCUT_BUFFER5) || \
1503 } 1503 EQ (symbol, QCUT_BUFFER6) || \
1504 EQ (symbol, QCUT_BUFFER7))) \
1505 signal_simple_error ("Doesn't name a cutbuffer", symbol); \
1506 } while (0)
1504 1507
1505 DEFUN ("x-get-cutbuffer-internal", Fx_get_cutbuffer_internal, 1, 1, 0, /* 1508 DEFUN ("x-get-cutbuffer-internal", Fx_get_cutbuffer_internal, 1, 1, 0, /*
1506 Return the value of the named CUTBUFFER (typically CUT_BUFFER0). 1509 Return the value of the named CUTBUFFER (typically CUT_BUFFER0).
1507 */ 1510 */
1508 (cutbuffer)) 1511 (cutbuffer))
1692 CONSOLE_HAS_METHOD (x, get_foreign_selection); 1695 CONSOLE_HAS_METHOD (x, get_foreign_selection);
1693 CONSOLE_HAS_METHOD (x, selection_exists_p); 1696 CONSOLE_HAS_METHOD (x, selection_exists_p);
1694 } 1697 }
1695 1698
1696 void 1699 void
1697 vars_of_xselect (void) 1700 reinit_vars_of_xselect (void)
1698 { 1701 {
1699 #ifdef CUT_BUFFER_SUPPORT
1700 cut_buffers_initialized = 0;
1701 Fprovide (intern ("cut-buffer"));
1702 #endif
1703
1704 reading_selection_reply = 0; 1702 reading_selection_reply = 0;
1705 reading_which_selection = 0; 1703 reading_which_selection = 0;
1706 selection_reply_timed_out = 0; 1704 selection_reply_timed_out = 0;
1707 for_whom_the_bell_tolls = 0; 1705 for_whom_the_bell_tolls = 0;
1708 prop_location_tick = 0; 1706 prop_location_tick = 0;
1707 }
1708
1709 void
1710 vars_of_xselect (void)
1711 {
1712 reinit_vars_of_xselect ();
1713
1714 #ifdef CUT_BUFFER_SUPPORT
1715 cut_buffers_initialized = 0;
1716 Fprovide (intern ("cut-buffer"));
1717 #endif
1709 1718
1710 DEFVAR_LISP ("x-sent-selection-hooks", &Vx_sent_selection_hooks /* 1719 DEFVAR_LISP ("x-sent-selection-hooks", &Vx_sent_selection_hooks /*
1711 A function or functions to be called after we have responded to some 1720 A function or functions to be called after we have responded to some
1712 other client's request for the value of a selection that we own. The 1721 other client's request for the value of a selection that we own. The
1713 function(s) will be called with four arguments: 1722 function(s) will be called with four arguments: