diff options
Diffstat (limited to 'src/macselect.c')
| -rw-r--r-- | src/macselect.c | 16 |
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 | ||
| 723 | DEFUN ("x-get-selection-internal", Fx_get_selection_internal, | 725 | DEFUN ("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. |
| 726 | SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 728 | SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
| 727 | TYPE is the type of data desired, typically `STRING'. | 729 | TYPE is the type of data desired, typically `STRING'. |
| 728 | TIME_STAMP is ignored on Mac. */) | 730 | TIME_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 | ||
| 820 | DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p, | 822 | DEFUN ("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. |
| 823 | The arg should be the name of the selection in question, typically one of | 825 | The arg should be the name of the selection in question, typically one of |
| 824 | the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 826 | the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
| 825 | For convenience, the symbol nil is the same as `PRIMARY', | 827 | For convenience, the symbol nil is the same as `PRIMARY', |
| @@ -864,7 +866,7 @@ and t is the same as `SECONDARY'. */) | |||
| 864 | 866 | ||
| 865 | DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, | 867 | DEFUN ("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. |
| 868 | The arg should be the name of the selection in question, typically one of | 870 | The arg should be the name of the selection in question, typically one of |
| 869 | the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 871 | the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
| 870 | For convenience, the symbol nil is the same as `PRIMARY', | 872 | For convenience, the symbol nil is the same as `PRIMARY', |
| @@ -1075,7 +1077,7 @@ a desired type to which the selection should be converted; | |||
| 1075 | and the local selection value (whatever was given to `x-own-selection'). | 1077 | and the local selection value (whatever was given to `x-own-selection'). |
| 1076 | 1078 | ||
| 1077 | The function should return the value to send to the Scrap Manager | 1079 | The 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 |
| 1079 | means that the conversion could not be done. | 1081 | means that the conversion could not be done. |
| 1080 | A return value which is the symbol `NULL' | 1082 | A return value which is the symbol `NULL' |
| 1081 | means that a side-effect was executed, | 1083 | means that a side-effect was executed, |