aboutsummaryrefslogtreecommitdiffstats
path: root/src/macselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/macselect.c')
-rw-r--r--src/macselect.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/macselect.c b/src/macselect.c
index b519950eb75..63221ba3a90 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -371,7 +371,7 @@ get_scrap_target_type_list (scrap)
371 err = GetScrapFlavorCount (scrap, &count); 371 err = GetScrapFlavorCount (scrap, &count);
372 if (err == noErr) 372 if (err == noErr)
373 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); 373 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
374 if (err == noErr && flavor_info) 374 if (flavor_info)
375 { 375 {
376 err = GetScrapFlavorInfoList (scrap, &count, flavor_info); 376 err = GetScrapFlavorInfoList (scrap, &count, flavor_info);
377 if (err != noErr) 377 if (err != noErr)
@@ -380,6 +380,8 @@ get_scrap_target_type_list (scrap)
380 flavor_info = NULL; 380 flavor_info = NULL;
381 } 381 }
382 } 382 }
383 if (flavor_info == NULL)
384 count = 0;
383#endif 385#endif
384 for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) 386 for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest))
385 { 387 {
@@ -710,7 +712,7 @@ anything that the functions on `selection-converter-alist' know about. */)
710{ 712{
711 check_mac (); 713 check_mac ();
712 CHECK_SYMBOL (selection_name); 714 CHECK_SYMBOL (selection_name);
713 if (NILP (selection_value)) error ("selection-value may not be nil"); 715 if (NILP (selection_value)) error ("SELECTION-VALUE may not be nil");
714 x_own_selection (selection_name, selection_value); 716 x_own_selection (selection_name, selection_value);
715 return selection_value; 717 return selection_value;
716} 718}
@@ -722,11 +724,11 @@ anything that the functions on `selection-converter-alist' know about. */)
722 724
723DEFUN ("x-get-selection-internal", Fx_get_selection_internal, 725DEFUN ("x-get-selection-internal", Fx_get_selection_internal,
724 Sx_get_selection_internal, 2, 3, 0, 726 Sx_get_selection_internal, 2, 3, 0,
725 doc: /* Return text selected from some Mac window. 727 doc: /* Return text selected from some Mac application.
726SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. 728SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
727TYPE is the type of data desired, typically `STRING'. 729TYPE is the type of data desired, typically `STRING'.
728TIME_STAMP is ignored on Mac. */) 730TIME_STAMP is ignored on Mac. */)
729 (selection_symbol, target_type, time_stamp) 731 (selection_symbol, target_type, time_stamp)
730 Lisp_Object selection_symbol, target_type, time_stamp; 732 Lisp_Object selection_symbol, target_type, time_stamp;
731{ 733{
732 Lisp_Object val = Qnil; 734 Lisp_Object val = Qnil;
@@ -819,7 +821,7 @@ Disowning it means there is no such selection. */)
819 821
820DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p, 822DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p,
821 0, 1, 0, 823 0, 1, 0,
822 doc: /* Whether the current Emacs process owns the given Selection. 824 doc: /* Whether the current Emacs process owns the given SELECTION.
823The arg should be the name of the selection in question, typically one of 825The arg should be the name of the selection in question, typically one of
824the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. 826the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
825For convenience, the symbol nil is the same as `PRIMARY', 827For convenience, the symbol nil is the same as `PRIMARY',
@@ -864,7 +866,7 @@ and t is the same as `SECONDARY'. */)
864 866
865DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, 867DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p,
866 0, 1, 0, 868 0, 1, 0,
867 doc: /* Whether there is an owner for the given Selection. 869 doc: /* Whether there is an owner for the given SELECTION.
868The arg should be the name of the selection in question, typically one of 870The arg should be the name of the selection in question, typically one of
869the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. 871the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
870For convenience, the symbol nil is the same as `PRIMARY', 872For convenience, the symbol nil is the same as `PRIMARY',
@@ -1075,7 +1077,7 @@ a desired type to which the selection should be converted;
1075and the local selection value (whatever was given to `x-own-selection'). 1077and the local selection value (whatever was given to `x-own-selection').
1076 1078
1077The function should return the value to send to the Scrap Manager 1079The function should return the value to send to the Scrap Manager
1078\(a string). A return value of nil 1080\(must be a string). A return value of nil
1079means that the conversion could not be done. 1081means that the conversion could not be done.
1080A return value which is the symbol `NULL' 1082A return value which is the symbol `NULL'
1081means that a side-effect was executed, 1083means that a side-effect was executed,