]> code.delx.au - gnu-emacs/blobdiff - src/nsselect.m
Merge emacs-25 into master (using imerge)
[gnu-emacs] / src / nsselect.m
index 8863bd27f16b0484ee6c424247896b21ffb7c256..5579cc5a767b2e920d805aa3cd5a50d1cef54747 100644 (file)
@@ -1,5 +1,5 @@
 /* NeXT/Open/GNUstep / MacOSX Cocoa selection processing for emacs.
-   Copyright (C) 1993-1994, 2005-2006, 2008-2014 Free Software
+   Copyright (C) 1993-1994, 2005-2006, 2008-2015 Free Software
    Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -34,8 +34,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 #include "termhooks.h"
 #include "keyboard.h"
 
-static Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME;
-
 static Lisp_Object Vselection_alist;
 
 /* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */
@@ -318,7 +316,7 @@ DEFUN ("ns-own-selection-internal", Fns_own_selection_internal,
        Sns_own_selection_internal, 2, 2, 0,
        doc: /* Assert an X selection of type SELECTION and value VALUE.
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-\(Those are literal upper-case symbol names, since that's what X expects.)
+(Those are literal upper-case symbol names, since that's what X expects.)
 VALUE is typically a string, or a cons of two markers, but may be
 anything that the functions on `selection-converter-alist' know about.  */)
      (Lisp_Object selection, Lisp_Object value)
@@ -387,18 +385,12 @@ Disowning it means there is no such selection.  */)
 
 
 DEFUN ("ns-selection-exists-p", Fns_selection_exists_p, Sns_selection_exists_p,
-       0, 2, 0, doc: /* Whether there is an owner for the given X selection.
+       0, 1, 0, doc: /* Whether there is an owner for the given X selection.
 SELECTION should be the name of the selection in question, typically
 one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.  (X expects
 these literal upper-case names.)  The symbol nil is the same as
-`PRIMARY', and t is the same as `SECONDARY'.
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, TERMINAL is unused.  */)
-     (Lisp_Object selection, Lisp_Object terminal)
+`PRIMARY', and t is the same as `SECONDARY'.  */)
+     (Lisp_Object selection)
 {
   id pb;
   NSArray *types;
@@ -418,20 +410,14 @@ On Nextstep, TERMINAL is unused.  */)
 
 
 DEFUN ("ns-selection-owner-p", Fns_selection_owner_p, Sns_selection_owner_p,
-       0, 2, 0,
+       0, 1, 0,
        doc: /* Whether the current Emacs process owns the given X Selection.
 The arg should be the name of the selection in question, typically one of
 the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-\(Those are literal upper-case symbol names, since that's what X expects.)
+(Those are literal upper-case symbol names, since that's what X expects.)
 For convenience, the symbol nil is the same as `PRIMARY',
-and t is the same as `SECONDARY'.
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, TERMINAL is unused.  */)
-     (Lisp_Object selection, Lisp_Object terminal)
+and t is the same as `SECONDARY'.  */)
+     (Lisp_Object selection)
 {
   check_window_system (NULL);
   CHECK_SYMBOL (selection);
@@ -444,22 +430,12 @@ On Nextstep, TERMINAL is unused.  */)
 
 
 DEFUN ("ns-get-selection", Fns_get_selection,
-       Sns_get_selection, 2, 4, 0,
+       Sns_get_selection, 2, 2, 0,
        doc: /* Return text selected from some X window.
 SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-\(Those are literal upper-case symbol names, since that's what X expects.)
-TARGET-TYPE is the type of data desired, typically `STRING'.
-
-TIME-STAMP is the time to use in the XConvertSelection call for foreign
-selections.  If omitted, defaults to the time for the last event.
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, TIME-STAMP and TERMINAL are unused.  */)
-     (Lisp_Object selection_name, Lisp_Object target_type,
-      Lisp_Object time_stamp, Lisp_Object terminal)
+(Those are literal upper-case symbol names, since that's what X expects.)
+TARGET-TYPE is the type of data desired, typically `STRING'.  */)
+     (Lisp_Object selection_name, Lisp_Object target_type)
 {
   Lisp_Object val = Qnil;
 
@@ -490,16 +466,16 @@ nxatoms_of_nsselect (void)
   NXSecondaryPboard = @"Secondary";
 
   // This is a memory loss, never released.
-  pasteboard_changecount =
-    [[NSMutableDictionary
-       dictionaryWithObjectsAndKeys:
-            [NSNumber numberWithLong:0], NSGeneralPboard,
-            [NSNumber numberWithLong:0], NXPrimaryPboard,
-            [NSNumber numberWithLong:0], NXSecondaryPboard,
-            [NSNumber numberWithLong:0], NSStringPboardType,
-            [NSNumber numberWithLong:0], NSFilenamesPboardType,
-            [NSNumber numberWithLong:0], NSTabularTextPboardType,
-       nil] retain];
+  pasteboard_changecount
+    [[NSMutableDictionary
+        dictionaryWithObjectsAndKeys:
+            [NSNumber numberWithLong:0], NSGeneralPboard,
+            [NSNumber numberWithLong:0], NXPrimaryPboard,
+            [NSNumber numberWithLong:0], NXSecondaryPboard,
+            [NSNumber numberWithLong:0], NSStringPboardType,
+            [NSNumber numberWithLong:0], NSFilenamesPboardType,
+            [NSNumber numberWithLong:0], NSTabularTextPboardType,
+        nil] retain];
 }
 
 void