aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsselect.m60
1 files changed, 19 insertions, 41 deletions
diff --git a/src/nsselect.m b/src/nsselect.m
index 1544b16dc9d..918fb55fb22 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -385,18 +385,12 @@ Disowning it means there is no such selection. */)
385 385
386 386
387DEFUN ("ns-selection-exists-p", Fns_selection_exists_p, Sns_selection_exists_p, 387DEFUN ("ns-selection-exists-p", Fns_selection_exists_p, Sns_selection_exists_p,
388 0, 2, 0, doc: /* Whether there is an owner for the given X selection. 388 0, 1, 0, doc: /* Whether there is an owner for the given X selection.
389SELECTION should be the name of the selection in question, typically 389SELECTION should be the name of the selection in question, typically
390one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. (X expects 390one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. (X expects
391these literal upper-case names.) The symbol nil is the same as 391these literal upper-case names.) The symbol nil is the same as
392`PRIMARY', and t is the same as `SECONDARY'. 392`PRIMARY', and t is the same as `SECONDARY'. */)
393 393 (Lisp_Object selection)
394TERMINAL should be a terminal object or a frame specifying the X
395server to query. If omitted or nil, that stands for the selected
396frame's display, or the first available X display.
397
398On Nextstep, TERMINAL is unused. */)
399 (Lisp_Object selection, Lisp_Object terminal)
400{ 394{
401 id pb; 395 id pb;
402 NSArray *types; 396 NSArray *types;
@@ -416,20 +410,14 @@ On Nextstep, TERMINAL is unused. */)
416 410
417 411
418DEFUN ("ns-selection-owner-p", Fns_selection_owner_p, Sns_selection_owner_p, 412DEFUN ("ns-selection-owner-p", Fns_selection_owner_p, Sns_selection_owner_p,
419 0, 2, 0, 413 0, 1, 0,
420 doc: /* Whether the current Emacs process owns the given X Selection. 414 doc: /* Whether the current Emacs process owns the given X Selection.
421The arg should be the name of the selection in question, typically one of 415The arg should be the name of the selection in question, typically one of
422the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. 416the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
423\(Those are literal upper-case symbol names, since that's what X expects.) 417\(Those are literal upper-case symbol names, since that's what X expects.)
424For convenience, the symbol nil is the same as `PRIMARY', 418For convenience, the symbol nil is the same as `PRIMARY',
425and t is the same as `SECONDARY'. 419and t is the same as `SECONDARY'. */)
426 420 (Lisp_Object selection)
427TERMINAL should be a terminal object or a frame specifying the X
428server to query. If omitted or nil, that stands for the selected
429frame's display, or the first available X display.
430
431On Nextstep, TERMINAL is unused. */)
432 (Lisp_Object selection, Lisp_Object terminal)
433{ 421{
434 check_window_system (NULL); 422 check_window_system (NULL);
435 CHECK_SYMBOL (selection); 423 CHECK_SYMBOL (selection);
@@ -442,22 +430,12 @@ On Nextstep, TERMINAL is unused. */)
442 430
443 431
444DEFUN ("ns-get-selection", Fns_get_selection, 432DEFUN ("ns-get-selection", Fns_get_selection,
445 Sns_get_selection, 2, 4, 0, 433 Sns_get_selection, 2, 2, 0,
446 doc: /* Return text selected from some X window. 434 doc: /* Return text selected from some X window.
447SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. 435SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
448\(Those are literal upper-case symbol names, since that's what X expects.) 436\(Those are literal upper-case symbol names, since that's what X expects.)
449TARGET-TYPE is the type of data desired, typically `STRING'. 437TARGET-TYPE is the type of data desired, typically `STRING'. */)
450 438 (Lisp_Object selection_name, Lisp_Object target_type)
451TIME-STAMP is the time to use in the XConvertSelection call for foreign
452selections. If omitted, defaults to the time for the last event.
453
454TERMINAL should be a terminal object or a frame specifying the X
455server to query. If omitted or nil, that stands for the selected
456frame's display, or the first available X display.
457
458On Nextstep, TIME-STAMP and TERMINAL are unused. */)
459 (Lisp_Object selection_name, Lisp_Object target_type,
460 Lisp_Object time_stamp, Lisp_Object terminal)
461{ 439{
462 Lisp_Object val = Qnil; 440 Lisp_Object val = Qnil;
463 441
@@ -488,16 +466,16 @@ nxatoms_of_nsselect (void)
488 NXSecondaryPboard = @"Secondary"; 466 NXSecondaryPboard = @"Secondary";
489 467
490 // This is a memory loss, never released. 468 // This is a memory loss, never released.
491 pasteboard_changecount = 469 pasteboard_changecount
492 [[NSMutableDictionary 470 = [[NSMutableDictionary
493 dictionaryWithObjectsAndKeys: 471 dictionaryWithObjectsAndKeys:
494 [NSNumber numberWithLong:0], NSGeneralPboard, 472 [NSNumber numberWithLong:0], NSGeneralPboard,
495 [NSNumber numberWithLong:0], NXPrimaryPboard, 473 [NSNumber numberWithLong:0], NXPrimaryPboard,
496 [NSNumber numberWithLong:0], NXSecondaryPboard, 474 [NSNumber numberWithLong:0], NXSecondaryPboard,
497 [NSNumber numberWithLong:0], NSStringPboardType, 475 [NSNumber numberWithLong:0], NSStringPboardType,
498 [NSNumber numberWithLong:0], NSFilenamesPboardType, 476 [NSNumber numberWithLong:0], NSFilenamesPboardType,
499 [NSNumber numberWithLong:0], NSTabularTextPboardType, 477 [NSNumber numberWithLong:0], NSTabularTextPboardType,
500 nil] retain]; 478 nil] retain];
501} 479}
502 480
503void 481void