Index: lisp/dumped-lisp.el =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/dumped-lisp.el,v retrieving revision 1.25 diff -u -r1.25 dumped-lisp.el --- lisp/dumped-lisp.el 1998/04/23 02:07:51 1.25 +++ lisp/dumped-lisp.el 1998/04/27 23:49:20 @@ -159,6 +159,7 @@ #+window-system "gui" #+window-system "mode-motion" #+window-system "mouse" + #+window-system "select" ;; preload the X code, for faster startup. #+(and (not infodock) (or x mswindows) menubar) "x-menubar" #+(and infodock (or x mswindows) menubar) "id-menus" Index: lisp/select.el =================================================================== RCS file: select.el diff -N select.el --- /dev/null Mon Apr 27 09:42:21 1998 +++ lisp/select.el Mon Apr 27 16:49:20 1998 @@ -0,0 +1,86 @@ +;;; select.el --- Lisp interface to windows selections. + +;; Copyright (C) 1998 Free Software Foundation, Inc. + +;; Maintainer: XEmacs Development Team +;; Keywords: extensions, dumped + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: Not in FSF + +;;; Commentary: + +;; This file is dumped with XEmacs + +;;; Code: + +(defun copy-primary-selection () + "Copy the selection to the Clipboard and the kill ring." + (interactive) + (case (device-type (selected-device)) + (x (x-copy-primary-selection)) + (mswindows (mswindows-copy-clipboard)) + (otherwise nil))) + +(defun kill-primary-selection () + "Copy the selection to the Clipboard and the kill ring, then delete it." + (interactive "*") + (case (device-type (selected-device)) + (x (x-kill-primary-selection)) + (mswindows (mswindows-cut-clipboard)) + (otherwise nil))) + +(defun delete-primary-selection () + "Delete the selection without copying it to the Clipboard or the kill ring." + (interactive "*") + (case (device-type (selected-device)) + (x (x-delete-primary-selection)) + (otherwise nil))) + +(defun yank-clipboard-selection () + "Insert the current Clipboard selection at point." + (interactive "*") + (case (device-type (selected-device)) + (x (x-yank-clipboard-selection)) + (mswindows (mswindows-paste-clipboard)) + (otherwise nil))) + +(defun selection-owner-p (&optional selection) + "Return t if current emacs process owns the given Selection. +The arg should be the name of the selection in question, typically one +of the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, +the symbol nil is the same as PRIMARY, and t is the same as +SECONDARY.)" + (interactive) + (case (device-type (selected-device)) + (x (x-selection-owner-p selection)) + (mswindows t) + (otherwise nil))) + +(defun selection-exists-p (&optional selection) + "Whether there is an owner for the given Selection. +The arg should be the name of the selection in question, typically one +of the symbols PRIMARY, SECONDARY, or CLIPBOARD. (For convenience, +the symbol nil is the same as PRIMARY, and t is the same as +SECONDARY." + (interactive) + (case (device-type (selected-device)) + (x (x-selection-exists-p selection)) + (mswindows t) + (otherwise nil))) Index: lisp/x-menubar.el =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/x-menubar.el,v retrieving revision 1.20 diff -u -r1.20 x-menubar.el --- lisp/x-menubar.el 1998/04/26 04:07:18 1.20 +++ lisp/x-menubar.el 1998/04/27 23:49:24 @@ -105,18 +105,14 @@ (or (eq buffer-undo-list pending-undo-list) (eq (cdr buffer-undo-list) pending-undo-list)))) :suffix (if (eq last-command 'redo) "More" "")] - ["Cut" x-kill-primary-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-owner-p))] - ["Copy" x-copy-primary-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-owner-p))] - ["Paste" x-yank-clipboard-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-exists-p 'CLIPBOARD))] - ["Clear" x-delete-primary-selection - :active (and (eq 'x (device-type (selected-device))) - (x-selection-owner-p))] + ["Cut" kill-primary-selection + :active (selection-owner-p)] + ["Copy" copy-primary-selection + :active (selection-owner-p)] + ["Paste" yank-clipboard-selection + :active (selection-exists-p 'CLIPBOARD)] + ["Clear" delete-primary-selection + :active (selection-owner-p)] "----" ["Search..." isearch-forward] ["Search Backward..." isearch-backward]