]> git.eshelyaron.com Git - emacs.git/commitdiff
Sync MS-DOS selection-related doc strings with X doc strings.
authorEli Zaretskii <eliz@gnu.org>
Sat, 11 Feb 2012 09:38:41 +0000 (11:38 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Feb 2012 09:38:41 +0000 (11:38 +0200)
 lisp/term/pc-win.el (x-select-text, x-selection-owner-p)
 (x-own-selection-internal, x-disown-selection-internal)
 (x-get-selection-internal): Sync doc strings and argument lists
 with xselect.c, common-win.el and x-win.el.  (Bug#10783)
 src/w16select.c (Fx_selection_exists_p): Sync doc string with
 xselect.c.  (Bug#10783)

lisp/ChangeLog
lisp/term/pc-win.el
src/ChangeLog
src/w16select.c

index c873cac2ffe2129b06e7695c2ea1c33a4b9395c1..2a59a061379ff901860a45eabff5d93c367da268 100644 (file)
@@ -1,3 +1,10 @@
+2012-02-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * term/pc-win.el (x-select-text, x-selection-owner-p)
+       (x-own-selection-internal, x-disown-selection-internal)
+       (x-get-selection-internal): Sync doc strings and argument lists
+       with xselect.c, common-win.el and x-win.el.  (Bug#10783)
+
 2012-02-11  Leo Liu  <sdl.web@gmail.com>
 
        * progmodes/python.el (python-end-of-statement): Fix infinite
index bfa642699af2ba4f3a054c48662612b44f0b1955..9bd772be9a8f7a7bac5fb54cfb107e512fc33579 100644 (file)
@@ -218,11 +218,12 @@ On X, if `x-select-enable-clipboard' is non-nil, copy TEXT to the
 clipboard.  If `x-select-enable-primary' is non-nil, put TEXT in
 the primary selection.
 
-On Windows, make TEXT the current selection.  If
+On MS-Windows, make TEXT the current selection.  If
 `x-select-enable-clipboard' is non-nil, copy the text to the
 clipboard as well.
 
-On Nextstep, put TEXT in the pasteboard."
+On Nextstep, put TEXT in the pasteboard (`x-select-enable-clipboard'
+is not used)."
   (if x-select-enable-clipboard
       (w16-set-clipboard-data text))
   (setq x-last-selected-text text))
@@ -248,13 +249,17 @@ On Nextstep, put TEXT in the pasteboard."
          (setq x-last-selected-text text))))))
 
 ;; x-selection-owner-p is used in simple.el.
-(defun x-selection-owner-p (&optional type)
+(defun x-selection-owner-p (&optional selection terminal)
   "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.)
 For convenience, the symbol nil is the same as `PRIMARY',
-and t is the same as `SECONDARY'."
+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."
     (if x-select-enable-clipboard
       (let (text)
        ;; Don't die if w16-get-clipboard-data signals an error.
@@ -272,30 +277,41 @@ and t is the same as `SECONDARY'."
 
 ;; x-own-selection-internal and x-disown-selection-internal are used
 ;; in select.el:x-set-selection.
-(defun x-own-selection-internal (type value)
-  "Assert an X selection of the given TYPE with the given VALUE.
-TYPE is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
+(defun x-own-selection-internal (selection value &optional frame)
+  "Assert an X selection of the type SELECTION with 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.)
 VALUE is typically a string, or a cons of two markers, but may be
-anything that the functions on `selection-converter-alist' know about."
+anything that the functions on `selection-converter-alist' know about.
+
+FRAME should be a frame that should own the selection.  If omitted or
+nil, it defaults to the selected frame."
   (ignore-errors
     (x-select-text value))
   value)
 
-(defun x-disown-selection-internal (selection &optional time)
+(defun x-disown-selection-internal (selection &optional time-object terminal)
   "If we own the selection SELECTION, disown it.
-Disowning it means there is no such selection."
+Disowning it means there is no such selection.
+
+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."
   (if (x-selection-owner-p selection)
       t))
 
 ;; x-get-selection-internal is used in select.el
-(defun x-get-selection-internal (selection type &optional time_stamp)
+(defun x-get-selection-internal (selection-symbol target-type &optional time_stamp terminal)
   "Return text selected from some X window.
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
 \(Those are literal upper-case symbol names, since that's what X expects.)
 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."
+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."
   (x-get-selection-value))
 
 ;; From src/fontset.c:
index 61828474d5e1d25e1c7a900253594b36df58fcf2..a3fc046ddb54a011eb5b58a591333ea958d7d13f 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * w16select.c (Fx_selection_exists_p): Sync doc string with
+       xselect.c.  (Bug#10783)
+
 2012-02-10  Glenn Morris  <rgm@gnu.org>
 
        * fns.c (Fsecure_hash): Doc fix.
index 185bf252895350a3df87691a8e3f1a044ad74ad3..03f63bedf0ddb97d34f4ccba4996f360ae5c269d 100644 (file)
@@ -637,14 +637,17 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
 /* Support checking for a clipboard selection. */
 
 DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p,
-       0, 1, 0,
-       doc: /* Whether there is an owner for 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.)
-For convenience, the symbol nil is the same as `PRIMARY',
-and t is the same as `SECONDARY'.  */)
-  (Lisp_Object selection)
+       0, 2, 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.  */)
+  (Lisp_Object selection, Lisp_Object terminal)
 {
   CHECK_SYMBOL (selection);