comparison src/xselect.c @ 83223:4056279af756

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 31 Oct 2004 02:05:24 +0000
parents 6d9b668e8f94 c02cbcd40932
children 7a0245dd1848
comparison
equal deleted inserted replaced
83222:ae7fab96922c 83223:4056279af756
106 #ifdef CUT_BUFFER_SUPPORT 106 #ifdef CUT_BUFFER_SUPPORT
107 Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3, 107 Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3,
108 QCUT_BUFFER4, QCUT_BUFFER5, QCUT_BUFFER6, QCUT_BUFFER7; 108 QCUT_BUFFER4, QCUT_BUFFER5, QCUT_BUFFER6, QCUT_BUFFER7;
109 #endif 109 #endif
110 110
111 static Lisp_Object Vx_lost_selection_hooks; 111 static Lisp_Object Vx_lost_selection_functions;
112 static Lisp_Object Vx_sent_selection_hooks; 112 static Lisp_Object Vx_sent_selection_functions;
113 /* Coding system for communicating with other X clients via cutbuffer, 113 /* Coding system for communicating with other X clients via cutbuffer,
114 selection, and clipboard. */ 114 selection, and clipboard. */
115 static Lisp_Object Vselection_coding_system; 115 static Lisp_Object Vselection_coding_system;
116 116
117 /* Coding system for the next communicating with other X clients. */ 117 /* Coding system for the next communicating with other X clients. */
862 DONE: 862 DONE:
863 863
864 /* Let random lisp code notice that the selection has been asked for. */ 864 /* Let random lisp code notice that the selection has been asked for. */
865 { 865 {
866 Lisp_Object rest; 866 Lisp_Object rest;
867 rest = Vx_sent_selection_hooks; 867 rest = Vx_sent_selection_functions;
868 if (!EQ (rest, Qunbound)) 868 if (!EQ (rest, Qunbound))
869 for (; CONSP (rest); rest = Fcdr (rest)) 869 for (; CONSP (rest); rest = Fcdr (rest))
870 call3 (Fcar (rest), selection_symbol, target_symbol, successful_p); 870 call3 (Fcar (rest), selection_symbol, target_symbol, successful_p);
871 } 871 }
872 872
945 945
946 /* Let random lisp code notice that the selection has been stolen. */ 946 /* Let random lisp code notice that the selection has been stolen. */
947 947
948 { 948 {
949 Lisp_Object rest; 949 Lisp_Object rest;
950 rest = Vx_lost_selection_hooks; 950 rest = Vx_lost_selection_functions;
951 if (!EQ (rest, Qunbound)) 951 if (!EQ (rest, Qunbound))
952 { 952 {
953 for (; CONSP (rest); rest = Fcdr (rest)) 953 for (; CONSP (rest); rest = Fcdr (rest))
954 call1 (Fcar (rest), selection_symbol); 954 call1 (Fcar (rest), selection_symbol);
955 prepare_menu_bars (); 955 prepare_menu_bars ();
978 && EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (Vselection_alist))))))) 978 && EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (Vselection_alist)))))))
979 { 979 {
980 /* Let random Lisp code notice that the selection has been stolen. */ 980 /* Let random Lisp code notice that the selection has been stolen. */
981 Lisp_Object hooks, selection_symbol; 981 Lisp_Object hooks, selection_symbol;
982 982
983 hooks = Vx_lost_selection_hooks; 983 hooks = Vx_lost_selection_functions;
984 selection_symbol = Fcar (Fcar (Vselection_alist)); 984 selection_symbol = Fcar (Fcar (Vselection_alist));
985 985
986 if (!EQ (hooks, Qunbound)) 986 if (!EQ (hooks, Qunbound))
987 { 987 {
988 for (; CONSP (hooks); hooks = Fcdr (hooks)) 988 for (; CONSP (hooks); hooks = Fcdr (hooks))
1002 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest)))))))) 1002 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest))))))))
1003 { 1003 {
1004 /* Let random Lisp code notice that the selection has been stolen. */ 1004 /* Let random Lisp code notice that the selection has been stolen. */
1005 Lisp_Object hooks, selection_symbol; 1005 Lisp_Object hooks, selection_symbol;
1006 1006
1007 hooks = Vx_lost_selection_hooks; 1007 hooks = Vx_lost_selection_functions;
1008 selection_symbol = Fcar (Fcar (XCDR (rest))); 1008 selection_symbol = Fcar (Fcar (XCDR (rest)));
1009 1009
1010 if (!EQ (hooks, Qunbound)) 1010 if (!EQ (hooks, Qunbound))
1011 { 1011 {
1012 for (; CONSP (hooks); hooks = Fcdr (hooks)) 1012 for (; CONSP (hooks); hooks = Fcdr (hooks))
2729 A return value which is the symbol `NULL' 2729 A return value which is the symbol `NULL'
2730 means that a side-effect was executed, 2730 means that a side-effect was executed,
2731 and there is no meaningful selection value. */); 2731 and there is no meaningful selection value. */);
2732 Vselection_converter_alist = Qnil; 2732 Vselection_converter_alist = Qnil;
2733 2733
2734 DEFVAR_LISP ("x-lost-selection-hooks", &Vx_lost_selection_hooks, 2734 DEFVAR_LISP ("x-lost-selection-functions", &Vx_lost_selection_functions,
2735 doc: /* A list of functions to be called when Emacs loses an X selection. 2735 doc: /* A list of functions to be called when Emacs loses an X selection.
2736 \(This happens when some other X client makes its own selection 2736 \(This happens when some other X client makes its own selection
2737 or when a Lisp program explicitly clears the selection.) 2737 or when a Lisp program explicitly clears the selection.)
2738 The functions are called with one argument, the selection type 2738 The functions are called with one argument, the selection type
2739 \(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'). */); 2739 \(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'). */);
2740 Vx_lost_selection_hooks = Qnil; 2740 Vx_lost_selection_functions = Qnil;
2741 2741
2742 DEFVAR_LISP ("x-sent-selection-hooks", &Vx_sent_selection_hooks, 2742 DEFVAR_LISP ("x-sent-selection-functions", &Vx_sent_selection_functions,
2743 doc: /* A list of functions to be called when Emacs answers a selection request. 2743 doc: /* A list of functions to be called when Emacs answers a selection request.
2744 The functions are called with four arguments: 2744 The functions are called with four arguments:
2745 - the selection name (typically `PRIMARY', `SECONDARY', or `CLIPBOARD'); 2745 - the selection name (typically `PRIMARY', `SECONDARY', or `CLIPBOARD');
2746 - the selection-type which Emacs was asked to convert the 2746 - the selection-type which Emacs was asked to convert the
2747 selection into before sending (for example, `STRING' or `LENGTH'); 2747 selection into before sending (for example, `STRING' or `LENGTH');
2749 We might have failed (and declined the request) for any number of reasons, 2749 We might have failed (and declined the request) for any number of reasons,
2750 including being asked for a selection that we no longer own, or being asked 2750 including being asked for a selection that we no longer own, or being asked
2751 to convert into a type that we don't know about or that is inappropriate. 2751 to convert into a type that we don't know about or that is inappropriate.
2752 This hook doesn't let you change the behavior of Emacs's selection replies, 2752 This hook doesn't let you change the behavior of Emacs's selection replies,
2753 it merely informs you that they have happened. */); 2753 it merely informs you that they have happened. */);
2754 Vx_sent_selection_hooks = Qnil; 2754 Vx_sent_selection_functions = Qnil;
2755 2755
2756 DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, 2756 DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
2757 doc: /* Coding system for communicating with other X clients. 2757 doc: /* Coding system for communicating with other X clients.
2758 When sending or receiving text via cut_buffer, selection, and clipboard, 2758 When sending or receiving text via cut_buffer, selection, and clipboard,
2759 the text is encoded or decoded by this coding system. 2759 the text is encoded or decoded by this coding system.