X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fselect-x.c;h=0332a4585f41c82359c55afd303f315103c568ac;hp=cc6031a4cbec9f4429406970f1324ea725a72f95;hb=ea1ea793fe6e244ef5555ed983423a204101af13;hpb=399b9f4466f37412410de8ec4a08e3dc5504ad10 diff --git a/src/select-x.c b/src/select-x.c index cc6031a..0332a45 100644 --- a/src/select-x.c +++ b/src/select-x.c @@ -1492,15 +1492,18 @@ initialize_cut_buffers (Display *display, Window window) cut_buffers_initialized = 1; } -#define CHECK_CUTBUFFER(symbol) \ - { CHECK_SYMBOL (symbol); \ - if (!EQ((symbol),QCUT_BUFFER0) && !EQ((symbol),QCUT_BUFFER1) && \ - !EQ((symbol),QCUT_BUFFER2) && !EQ((symbol),QCUT_BUFFER3) && \ - !EQ((symbol),QCUT_BUFFER4) && !EQ((symbol),QCUT_BUFFER5) && \ - !EQ((symbol),QCUT_BUFFER6) && !EQ((symbol),QCUT_BUFFER7)) \ - signal_error (Qerror, list2 (build_string ("Doesn't name a cutbuffer"), \ - (symbol))); \ - } +#define CHECK_CUTBUFFER(symbol) do { \ + CHECK_SYMBOL (symbol); \ + if (! (EQ (symbol, QCUT_BUFFER0) || \ + EQ (symbol, QCUT_BUFFER1) || \ + EQ (symbol, QCUT_BUFFER2) || \ + EQ (symbol, QCUT_BUFFER3) || \ + EQ (symbol, QCUT_BUFFER4) || \ + EQ (symbol, QCUT_BUFFER5) || \ + EQ (symbol, QCUT_BUFFER6) || \ + EQ (symbol, QCUT_BUFFER7))) \ + signal_simple_error ("Doesn't name a cutbuffer", symbol); \ +} while (0) DEFUN ("x-get-cutbuffer-internal", Fx_get_cutbuffer_internal, 1, 1, 0, /* Return the value of the named CUTBUFFER (typically CUT_BUFFER0). @@ -1694,18 +1697,24 @@ console_type_create_select_x (void) } void -vars_of_xselect (void) +reinit_vars_of_xselect (void) { -#ifdef CUT_BUFFER_SUPPORT - cut_buffers_initialized = 0; - Fprovide (intern ("cut-buffer")); -#endif - reading_selection_reply = 0; reading_which_selection = 0; selection_reply_timed_out = 0; for_whom_the_bell_tolls = 0; prop_location_tick = 0; +} + +void +vars_of_xselect (void) +{ + reinit_vars_of_xselect (); + +#ifdef CUT_BUFFER_SUPPORT + cut_buffers_initialized = 0; + Fprovide (intern ("cut-buffer")); +#endif DEFVAR_LISP ("x-sent-selection-hooks", &Vx_sent_selection_hooks /* A function or functions to be called after we have responded to some