Merge from trunk
[bpt/emacs.git] / lisp / term / x-win.el
index 21be4ee..65ba534 100644 (file)
@@ -133,9 +133,9 @@ When a session manager tells Emacs that the window system is shutting
 down, this function is called.  It calls the functions in the hook
 `emacs-save-session-functions'.  Functions are called with the current
 buffer set to a temporary buffer.  Functions should use `insert' to insert
-lisp code to save the session state.  The buffer is saved
-in a file in the home directory of the user running Emacs.  The file
-is evaluated when Emacs is restarted by the session manager.
+lisp code to save the session state.  The buffer is saved in a file in the
+home directory of the user running Emacs.  The file is evaluated when
+Emacs is restarted by the session manager.
 
 If any of the functions returns non-nil, no more functions are called
 and this function returns non-nil.  This will inform the session manager
@@ -1219,35 +1219,27 @@ This is the actual text stored in the X cut buffer.")
   "Max number of characters to put in the cut buffer.
 It is said that overlarge strings are slow to put into the cut buffer.")
 
-(defcustom x-select-enable-clipboard nil
+(defcustom x-select-enable-clipboard t
   "Non-nil means cutting and pasting uses the clipboard.
-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.\)"
+This is in addition to, but in preference to, the primary selection."
   :type 'boolean
-  :group 'killing)
+  :group 'killing
+  :version "24.1")
 
-(defcustom x-select-enable-primary t
+(defcustom x-select-enable-primary nil
   "Non-nil means cutting and pasting uses the primary selection."
   :type 'boolean
-  :group 'killing)
+  :group 'killing
+  :version "24.1")
 
 (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' is non-nil, copy TEXT to the
+clipboard.  If `x-select-enable-primary' is non-nil, put TEXT in
+the primary selection.  For backward compatibility with older X
+applications, this function also sets the value of X cut buffer
+0, and, if the optional argument PUSH is non-nil, rotates the cut
+buffers."
   ;; 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.
@@ -1286,7 +1278,7 @@ The value nil is the same as this list:
 ")
 
 ;; Get a selection value of type TYPE by calling x-get-selection with
-;; an appropiate DATA-TYPE argument decided by `x-select-request-type'.
+;; an appropriate DATA-TYPE argument decided by `x-select-request-type'.
 ;; The return value is already decoded.  If x-get-selection causes an
 ;; error, this function return nil.
 
@@ -1425,7 +1417,7 @@ The value nil is the same as this list:
 (declare-function accelerate-menu "xmenu.c" (&optional frame) t)
 
 (defun x-menu-bar-open (&optional frame)
-  "Open the menu bar if `menu-bar-mode' is on. otherwise call `tmm-menubar'."
+  "Open the menu bar if `menu-bar-mode' is on, otherwise call `tmm-menubar'."
   (interactive "i")
   (if (and menu-bar-mode
           (fboundp 'accelerate-menu))
@@ -1482,7 +1474,7 @@ The value nil is the same as this list:
   ;; Create the standard fontset.
   (condition-case err
        (create-fontset-from-fontset-spec standard-fontset-spec t)
-    (error (display-warning 
+    (error (display-warning
            'initialization
            (format "Creation of the standard fontset failed: %s" err)
            :error)))
@@ -1560,12 +1552,12 @@ The value nil is the same as this list:
   ;; Enable CLIPBOARD copy/paste through menu bar commands.
   (menu-bar-enable-clipboard)
 
-  ;; Override Paste so it looks at CLIPBOARD first.
-  (define-key menu-bar-edit-menu [paste]
-    (append '(menu-item "Paste" x-clipboard-yank
-                       :enable (not buffer-read-only)
-                       :help "Paste (yank) text most recently cut/copied")
-           nil))
+  ;; ;; Override Paste so it looks at CLIPBOARD first.
+  ;; (define-key menu-bar-edit-menu [paste]
+  ;;   (append '(menu-item "Paste" x-clipboard-yank
+  ;;                   :enable (not buffer-read-only)
+  ;;                   :help "Paste (yank) text most recently cut/copied")
+  ;;       nil))
 
   (setq x-initialized t))
 
@@ -1654,7 +1646,7 @@ A value that begins with n: denotes a named icon instead of a stock icon."
   :group 'x)
 
 (defcustom icon-map-list '(x-gtk-stock-map)
-  "A list of alists that maps icon file names to stock/named icons.
+  "A list of alists that map icon file names to stock/named icons.
 The alists are searched in the order they appear.  The first match is used.
 The keys in the alists are file names without extension and with two directory
 components.  For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm