emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp select.el w32-fns.el w32-vars.el Cha...


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs/lisp select.el w32-fns.el w32-vars.el Cha...
Date: Sat, 25 Jul 2009 09:31:12 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    09/07/25 09:31:11

Modified files:
        lisp           : select.el w32-fns.el w32-vars.el ChangeLog 
        lisp/term      : common-win.el pc-win.el ns-win.el x-win.el 

Log message:
        Fix Bug#3888:
        w32-vars.el (x-select-enable-clipboard): Doc fix.
        term/pc-win.el (x-display-name, x-colors)
        (x-select-enable-clipboard, x-select-text): Doc fix.
        term/common-win.el (x-display-name, x-colors): Doc fix.
        term/ns-win.el (x-select-text, x-setup-function-keys, x-colors)
        (xw-defined-colors): Doc fix.
        w32-fns.el (x-select-text, x-setup-function-keys)
        (x-get-selection, x-set-selection): Doc fix.
        term/x-win.el (x-select-text, x-setup-function-keys)
        (x-select-enable-clipboard, xw-defined-colors): Doc fix.
        select.el (x-set-selection): Doc fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/select.el?cvsroot=emacs&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/w32-fns.el?cvsroot=emacs&r1=1.92&r2=1.93
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/w32-vars.el?cvsroot=emacs&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15858&r2=1.15859
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/term/common-win.el?cvsroot=emacs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/term/pc-win.el?cvsroot=emacs&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/term/ns-win.el?cvsroot=emacs&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/term/x-win.el?cvsroot=emacs&r1=1.240&r2=1.241

Patches:
Index: select.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/select.el,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- select.el   15 Jul 2009 01:25:36 -0000      1.50
+++ select.el   25 Jul 2009 09:31:05 -0000      1.51
@@ -116,28 +116,28 @@
 
 (defun x-set-selection (type data)
   "Make an X Windows selection of type TYPE and value DATA.
-TYPE is a symbol specifying the selection type.  This is normally
-one of `PRIMARY', `SECONDARY', or `CLIPBOARD'; or nil, which is
-equivalent to `PRIMARY'.  (It can also be a string, which stands
-for the symbol with that name, but this usage is obsolete.)
-
-DATA is a selection value.  It should be one of the following:
- - A vector of non-vector selection values.
- - A string.
- - An integer.
- - A cons cell of two markers pointing to the same buffer
-   (the data consists of the text between the markers).
- - An overlay (the data consists of the text within the overlay).
- - A buffer (the data consists of the text in the region).
-For the last three cases, the actual selection data is computed
-only when the selection is requested.  Thus, it includes any
-changes made to the buffer after `x-set-selection' is called.
+The argument TYPE (nil means `PRIMARY') says which selection, and
+DATA specifies the contents.  TYPE must be a symbol.  \(It can also
+be a string, which stands for the symbol with that name, but this
+is considered obsolete.)  DATA may be a string, a symbol, an
+integer (or a cons of two integers or list of two integers).
+
+The selection may also be a cons of two markers pointing to the same buffer,
+or an overlay.  In these cases, the selection is considered to be the text
+between the markers *at whatever time the selection is examined*.
+Thus, editing done in the buffer after you specify the selection
+can alter the effective value of the selection.
+
+The data may also be a vector of valid non-vector selection values.
 
 The return value is DATA.
 
 Interactively, this command sets the primary selection.  Without
 prefix argument, it reads the selection in the minibuffer.  With
-prefix argument, it uses the text of the region as the selection value ."
+prefix argument, it uses the text of the region as the selection value.
+
+Note that on MS-Windows, primary and secondary selections set by Emacs
+are not available to other programs."
   (interactive (if (not current-prefix-arg)
                   (list 'PRIMARY (read-string "Set text for pasting: "))
                 (list 'PRIMARY (buffer-substring (region-beginning) 
(region-end)))))

Index: w32-fns.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/w32-fns.el,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -b -r1.92 -r1.93
--- w32-fns.el  17 Jul 2009 15:45:15 -0000      1.92
+++ w32-fns.el  25 Jul 2009 09:31:06 -0000      1.93
@@ -55,7 +55,7 @@
   "Keymap of possible alternative meanings for some keys.")
 
 (defun x-setup-function-keys (frame)
-  "Set up `function-key-map' on FRAME for w32."
+  "Set up `function-key-map' on the graphical frame FRAME."
   ;; Don't do this twice on the same display, or it would break
   ;; normal-erase-is-backspace-mode.
   (unless (terminal-parameter frame 'x-setup-function-keys)
@@ -294,9 +294,44 @@
 
 ;;; Fix interface to (X-specific) mouse.el
 (defun x-set-selection (type data)
+  "Make an X Windows selection of type TYPE and value DATA.
+The argument TYPE (nil means `PRIMARY') says which selection, and
+DATA specifies the contents.  TYPE must be a symbol.  \(It can also
+be a string, which stands for the symbol with that name, but this
+is considered obsolete.)  DATA may be a string, a symbol, an
+integer (or a cons of two integers or list of two integers).
+
+The selection may also be a cons of two markers pointing to the same buffer,
+or an overlay.  In these cases, the selection is considered to be the text
+between the markers *at whatever time the selection is examined*.
+Thus, editing done in the buffer after you specify the selection
+can alter the effective value of the selection.
+
+The data may also be a vector of valid non-vector selection values.
+
+The return value is DATA.
+
+Interactively, this command sets the primary selection.  Without
+prefix argument, it reads the selection in the minibuffer.  With
+prefix argument, it uses the text of the region as the selection value.
+
+Note that on MS-Windows, primary and secondary selections set by Emacs
+are not available to other programs."
   (put 'x-selections (or type 'PRIMARY) data))
 
 (defun x-get-selection (&optional type data-type)
+  "Return the value of an X Windows selection.
+The argument TYPE (default `PRIMARY') says which selection,
+and the argument DATA-TYPE (default `STRING') says
+how to convert the data.
+
+TYPE may be any symbol \(but nil stands for `PRIMARY').  However,
+only a few symbols are commonly used.  They conventionally have
+all upper-case names.  The most often used ones, in addition to
+`PRIMARY', are `SECONDARY' and `CLIPBOARD'.
+
+DATA-TYPE is usually `STRING', but can also be one of the symbols
+in `selection-converter-alist', which see."
   (get 'x-selections (or type 'PRIMARY)))
 
 ;; x-selection-owner-p is used in simple.el
@@ -418,9 +453,19 @@
   "Max number of characters to put in the cut buffer.")
 
 (defun x-select-text (text &optional push)
-  "Make TEXT the last selected text.
-If `x-select-enable-clipboard' is non-nil, copy the text to the system
-clipboard as well.  Optional PUSH is ignored on Windows."
+  "Select TEXT, a string, according to the window system.
+
+On X, put TEXT in the primary X selection.  For backward
+compatibility with older X applications, set the value of X cut
+buffer 0 as well, and if the optional argument PUSH is non-nil,
+rotate the cut buffers.  If `x-select-enable-clipboard' is
+non-nil, copy the text to the X clipboard as well.
+
+On Windows, make TEXT the current selection.  If
+`x-select-enable-clipboard' is non-nil, copy the text to the
+clipboard as well.  The argument PUSH is ignored.
+
+On Nextstep, put TEXT in the pasteboard; PUSH is ignored."
   (if x-select-enable-clipboard
       (w32-set-clipboard-data text))
   (setq x-last-selected-text text))

Index: w32-vars.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/w32-vars.el,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- w32-vars.el 10 Mar 2009 23:48:34 -0000      1.27
+++ w32-vars.el 25 Jul 2009 09:31:06 -0000      1.28
@@ -149,7 +149,11 @@
 
 (defcustom x-select-enable-clipboard t
   "Non-nil means cutting and pasting uses the clipboard.
-This is in addition to the primary selection."
+This is in addition to, but in preference to, the primary selection.
+
+On MS-Windows, this is non-nil by default, since Windows does not
+support other types of selections.  \(The primary selection that is
+set by Emacs is not accessible to other programs on Windows.\)"
   :type 'boolean
   :group 'killing)
 

Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15858
retrieving revision 1.15859
diff -u -b -r1.15858 -r1.15859
--- ChangeLog   25 Jul 2009 08:31:40 -0000      1.15858
+++ ChangeLog   25 Jul 2009 09:31:07 -0000      1.15859
@@ -1,3 +1,25 @@
+2009-07-25  Eli Zaretskii  <address@hidden>
+
+       Fix Bug#3888:
+
+       * w32-vars.el (x-select-enable-clipboard): Doc fix.
+
+       * term/pc-win.el (x-display-name, x-colors)
+       (x-select-enable-clipboard, x-select-text): Doc fix.
+
+       * term/common-win.el (x-display-name, x-colors): Doc fix.
+
+       * term/ns-win.el (x-select-text, x-setup-function-keys, x-colors)
+       (xw-defined-colors): Doc fix.
+
+       * w32-fns.el (x-select-text, x-setup-function-keys)
+       (x-get-selection, x-set-selection): Doc fix.
+
+       * term/x-win.el (x-select-text, x-setup-function-keys)
+       (x-select-enable-clipboard, xw-defined-colors): Doc fix.
+
+       * select.el (x-set-selection): Doc fix.
+
 2009-07-25  Michael Albinus  <address@hidden>
 
        * net/zeroconf.el (zeroconf-init): Check for "GetVersionString"

Index: term/common-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/common-win.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- term/common-win.el  5 Jan 2009 03:23:55 -0000       1.3
+++ term/common-win.el  25 Jul 2009 09:31:11 -0000      1.4
@@ -131,7 +131,9 @@
                                  initial-frame-alist)))
 
 (defvar x-display-name nil
-  "The name of the X display on which Emacs was started.
+  "The name of the window display on which Emacs was started.
+On X, the display name of individual X frames is recorded in the
+`display' frame parameter.")
 
 For the X display name of individual frames, see the `display'
 frame parameter.")
@@ -288,8 +290,10 @@
     "cyan" "medium spring green" "spring green" "green" "lawn green" 
"chartreuse"
     "yellow" "gold" "orange" "dark orange" "orange red" "red" "white" "white 
smoke"
     "gainsboro" "light grey" "gray" "dark grey" "dim gray" "black" )
-  "The list of X colors from the `rgb.txt' file.
-XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
+  "List of basic colors available on color displays.
+For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20.
+For Nextstep, this is a list of non-PANTONE colors returned by
+the operating system.")
 
 ;; arch-tag: 2a128601-99cc-401e-9dff-0ee6a36102ef
 ;;; common-win.el ends here

Index: term/pc-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/pc-win.el,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- term/pc-win.el      18 Jul 2009 11:12:41 -0000      1.58
+++ term/pc-win.el      25 Jul 2009 09:31:11 -0000      1.59
@@ -181,9 +181,14 @@
 
 ;; From lisp/term/x-win.el
 (defvar x-display-name "pc"
-  "The display name specifying the MS-DOS display and frame type.")
+  "The name of the window display on which Emacs was started.
+On X, the display name of individual X frames is recorded in the
+`display' frame parameter.")
 (defvar x-colors (mapcar 'car msdos-color-values)
-  "The list of colors available on a PC display under MS-DOS.")
+  "List of basic colors available on color displays.
+For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20.
+For Nextstep, this is a list of non-PANTONE colors returned by
+the operating system.")
 
 ;; From lisp/term/w32-win.el
 ;
@@ -196,12 +201,28 @@
 
 (defcustom x-select-enable-clipboard t
   "Non-nil means cutting and pasting uses the clipboard.
-This is the default on this system, since MS-Windows does not
-support other types of selections."
+This is in addition to, but in preference to, the primary selection.
+
+On MS-Windows, this is non-nil by default, since Windows does not
+support other types of selections.  \(The primary selection that is
+set by Emacs is not accessible to other programs on Windows.\)"
   :type 'boolean
   :group 'killing)
 
 (defun x-select-text (text &optional push)
+  "Select TEXT, a string, according to the window system.
+
+On X, put TEXT in the primary X selection.  For backward
+compatibility with older X applications, set the value of X cut
+buffer 0 as well, and if the optional argument PUSH is non-nil,
+rotate the cut buffers.  If `x-select-enable-clipboard' is
+non-nil, copy the text to the X clipboard as well.
+
+On Windows, make TEXT the current selection.  If
+`x-select-enable-clipboard' is non-nil, copy the text to the
+clipboard as well.  The argument PUSH is ignored.
+
+On Nextstep, put TEXT in the pasteboard; PUSH is ignored."
   (if x-select-enable-clipboard
       (w16-set-clipboard-data text))
   (setq x-last-selected-text text))

Index: term/ns-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/ns-win.el,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- term/ns-win.el      16 Jul 2009 08:24:56 -0000      1.46
+++ term/ns-win.el      25 Jul 2009 09:31:11 -0000      1.47
@@ -309,7 +309,7 @@
 (defalias 'do-applescript 'ns-do-applescript)
 
 (defun x-setup-function-keys (frame)
-  "Set up function Keys for Nextstep for frame FRAME."
+  "Set up function keys on the graphical frame FRAME."
   (unless (terminal-parameter frame 'x-setup-function-keys)
     (with-selected-frame frame
       (setq interprogram-cut-function 'x-select-text
@@ -1003,7 +1003,19 @@
 (defvar ns-last-selected-text nil)
 
 (defun x-select-text (text &optional push)
-  "Put TEXT, a string, on the pasteboard."
+  "Select TEXT, a string, according to the window system.
+
+On X, put TEXT in the primary X selection.  For backward
+compatibility with older X applications, set the value of X cut
+buffer 0 as well, and if the optional argument PUSH is non-nil,
+rotate the cut buffers.  If `x-select-enable-clipboard' is
+non-nil, copy the text to the X clipboard as well.
+
+On Windows, make TEXT the current selection.  If
+`x-select-enable-clipboard' is non-nil, copy the text to the
+clipboard as well.  The argument PUSH is ignored.
+
+On Nextstep, put TEXT in the pasteboard; PUSH is ignored."
   ;; Don't send the pasteboard too much text.
   ;; It becomes slow, and if really big it causes errors.
   (ns-set-pasteboard text)
@@ -1113,12 +1125,13 @@
 (declare-function ns-list-colors "nsfns.m" (&optional frame))
 
 (defvar x-colors (ns-list-colors)
-  "The list of colors defined in non-PANTONE color files.")
+  "List of basic colors available on color displays.
+For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20.
+For Nextstep, this is a list of non-PANTONE colors returned by
+the operating system.")
 
 (defun xw-defined-colors (&optional frame)
-  "Return a list of colors supported for a particular frame.
-The argument FRAME specifies which frame to try.
-The value may be different for frames on different Nextstep displays."
+  "Internal function called by `defined-colors'."
   (or frame (setq frame (selected-frame)))
   (let ((all-colors x-colors)
        (this-color nil)

Index: term/x-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/x-win.el,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -b -r1.240 -r1.241
--- term/x-win.el       19 Mar 2009 00:56:52 -0000      1.240
+++ term/x-win.el       25 Jul 2009 09:31:11 -0000      1.241
@@ -255,7 +255,7 @@
 (defvar x-colors)
 
 (defun xw-defined-colors (&optional frame)
-  "Internal function called by `defined-colors', which see."
+  "Internal function called by `defined-colors'."
   (or frame (setq frame (selected-frame)))
   (let ((all-colors x-colors)
        (this-color nil)
@@ -292,7 +292,7 @@
   "Keymap of possible alternative meanings for some keys.")
 
 (defun x-setup-function-keys (frame)
-  "Set up `function-key-map' on FRAME for the X window system."
+  "Set up `function-key-map' on the graphical frame FRAME."
   ;; Don't do this twice on the same display, or it would break
   ;; normal-erase-is-backspace-mode.
   (unless (terminal-parameter frame 'x-setup-function-keys)
@@ -1239,7 +1239,11 @@
 
 (defcustom x-select-enable-clipboard nil
   "Non-nil means cutting and pasting uses the clipboard.
-This is in addition to, but in preference to, the primary selection."
+This is in addition to, but in preference to, the primary selection.
+
+On MS-Windows, this is non-nil by default, since Windows does not
+support other types of selections.  \(The primary selection that is
+set by Emacs is not accessible to other programs on Windows.\)"
   :type 'boolean
   :group 'killing)
 
@@ -1249,11 +1253,19 @@
   :group 'killing)
 
 (defun x-select-text (text &optional push)
-  "Make TEXT, a string, the primary X selection.
-Also, set the value of X cut buffer 0, for backward compatibility
-with older X applications.
address@hidden says it's not desirable to put kills
-in the clipboard."
+  "Select TEXT, a string, according to the window system.
+
+On X, put TEXT in the primary X selection.  For backward
+compatibility with older X applications, set the value of X cut
+buffer 0 as well, and if the optional argument PUSH is non-nil,
+rotate the cut buffers.  If `x-select-enable-clipboard' is
+non-nil, copy the text to the X clipboard as well.
+
+On Windows, make TEXT the current selection.  If
+`x-select-enable-clipboard' is non-nil, copy the text to the
+clipboard as well.  The argument PUSH is ignored.
+
+On Nextstep, put TEXT in the pasteboard; PUSH is ignored."
   ;; With multi-tty, this function may be called from a tty frame.
   (when (eq (framep (selected-frame)) 'x)
     ;; Don't send the cut buffer too much text.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]