aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorJoakim Verona2015-01-25 21:19:27 +0100
committerJoakim Verona2015-01-25 21:19:27 +0100
commitd522fd8ca73e668bfafd0419bc5f71f2751cca24 (patch)
tree4b57a4d2d26e578035801f1c895dcfda5895e09d /src/xselect.c
parente5087278b9bcab5847ce63d80c0d74c27f50e719 (diff)
parenta3689d3c661fe36df971c875760f8d500b5ae994 (diff)
downloademacs-d522fd8ca73e668bfafd0419bc5f71f2751cca24.tar.gz
emacs-d522fd8ca73e668bfafd0419bc5f71f2751cca24.zip
Merge branch 'master' into xwidget
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 33ff366b89c..027192dfea2 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -817,14 +817,8 @@ x_handle_selection_request (struct input_event *event)
817 /* Run the `x-sent-selection-functions' abnormal hook. */ 817 /* Run the `x-sent-selection-functions' abnormal hook. */
818 if (!NILP (Vx_sent_selection_functions) 818 if (!NILP (Vx_sent_selection_functions)
819 && !EQ (Vx_sent_selection_functions, Qunbound)) 819 && !EQ (Vx_sent_selection_functions, Qunbound))
820 { 820 CALLN (Frun_hook_with_args, Qx_sent_selection_functions,
821 Lisp_Object args[4]; 821 selection_symbol, target_symbol, success ? Qt : Qnil);
822 args[0] = Qx_sent_selection_functions;
823 args[1] = selection_symbol;
824 args[2] = target_symbol;
825 args[3] = success ? Qt : Qnil;
826 Frun_hook_with_args (4, args);
827 }
828 822
829 unbind_to (count, Qnil); 823 unbind_to (count, Qnil);
830 UNGCPRO; 824 UNGCPRO;
@@ -937,12 +931,7 @@ x_handle_selection_clear (struct input_event *event)
937 tset_selection_alist (dpyinfo->terminal, Vselection_alist); 931 tset_selection_alist (dpyinfo->terminal, Vselection_alist);
938 932
939 /* Run the `x-lost-selection-functions' abnormal hook. */ 933 /* Run the `x-lost-selection-functions' abnormal hook. */
940 { 934 CALLN (Frun_hook_with_args, Qx_lost_selection_functions, selection_symbol);
941 Lisp_Object args[2];
942 args[0] = Qx_lost_selection_functions;
943 args[1] = selection_symbol;
944 Frun_hook_with_args (2, args);
945 }
946 935
947 redisplay_preserve_echo_area (20); 936 redisplay_preserve_echo_area (20);
948} 937}
@@ -978,10 +967,8 @@ x_clear_frame_selections (struct frame *f)
978 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (t->Vselection_alist))))))) 967 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (t->Vselection_alist)))))))
979 { 968 {
980 /* Run the `x-lost-selection-functions' abnormal hook. */ 969 /* Run the `x-lost-selection-functions' abnormal hook. */
981 Lisp_Object args[2]; 970 CALLN (Frun_hook_with_args, Qx_lost_selection_functions,
982 args[0] = Qx_lost_selection_functions; 971 Fcar (Fcar (t->Vselection_alist)));
983 args[1] = Fcar (Fcar (t->Vselection_alist));
984 Frun_hook_with_args (2, args);
985 972
986 tset_selection_alist (t, XCDR (t->Vselection_alist)); 973 tset_selection_alist (t, XCDR (t->Vselection_alist));
987 } 974 }
@@ -991,10 +978,8 @@ x_clear_frame_selections (struct frame *f)
991 if (CONSP (XCDR (rest)) 978 if (CONSP (XCDR (rest))
992 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (XCDR (rest)))))))) 979 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (XCDR (rest))))))))
993 { 980 {
994 Lisp_Object args[2]; 981 CALLN (Frun_hook_with_args, Qx_lost_selection_functions,
995 args[0] = Qx_lost_selection_functions; 982 XCAR (XCAR (XCDR (rest))));
996 args[1] = XCAR (XCAR (XCDR (rest)));
997 Frun_hook_with_args (2, args);
998 XSETCDR (rest, XCDR (XCDR (rest))); 983 XSETCDR (rest, XCDR (XCDR (rest)));
999 break; 984 break;
1000 } 985 }
@@ -2138,7 +2123,7 @@ x_clipboard_manager_error_1 (Lisp_Object err)
2138{ 2123{
2139 AUTO_STRING (format, "X clipboard manager error: %s\n\ 2124 AUTO_STRING (format, "X clipboard manager error: %s\n\
2140If the problem persists, set `x-select-enable-clipboard-manager' to nil."); 2125If the problem persists, set `x-select-enable-clipboard-manager' to nil.");
2141 Fmessage (2, (Lisp_Object []) {format, CAR (CDR (err))}); 2126 CALLN (Fmessage, format, CAR (CDR (err)));
2142 return Qnil; 2127 return Qnil;
2143} 2128}
2144 2129