X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmsw-select.el;h=ff659f9c2beff88560e41f0f8facfeed772210c5;hb=9f7593526f487e8b5272d5aa2a72facbf121b23e;hp=34b43b8905e64e8f4fc03feb1a883f7950edb2e8;hpb=976b002b16336930724ae22476014583ad022e7d;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/msw-select.el b/lisp/msw-select.el index 34b43b8..ff659f9 100644 --- a/lisp/msw-select.el +++ b/lisp/msw-select.el @@ -38,7 +38,7 @@ replacing the active selection if there is one." (interactive "*") (setq last-command nil) (setq this-command 'yank) ; so that yank-pop works. - (let ((clip (mswindows-get-clipboard)) (s (mark-marker)) (e (point-marker))) + (let ((clip (get-clipboard)) (s (mark-marker)) (e (point-marker))) (or clip (error "there is no text on the clipboard")) (if s (if mouse-track-rectangle-p @@ -49,61 +49,6 @@ replacing the active selection if there is one." (insert-rectangle clip) (insert clip)))) -(defun mswindows-own-clipboard (string) - "Paste the given string to the mswindows clipboard." - (mswindows-set-clipboard string)) -(defvar mswindows-selection-owned-p nil - "Whether we have a selection or not. -MS-Windows has no concept of ownership; don't use this.") -(defun mswindows-own-selection (data &optional type) - "Make an MS-Windows selection of type TYPE and value DATA. -The argument TYPE is ignored, and DATA specifies the contents. -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. - -Interactively, the text of the region is used as the selection value." - (interactive (if (not current-prefix-arg) - (list (read-string "Store text for pasting: ")) - (list (substring (region-beginning) (region-end))))) - (or (valid-simple-selection-p data) - (and (vectorp data) - (let ((valid t) - (i (1- (length data)))) - (while (>= i 0) - (or (valid-simple-selection-p (aref data i)) - (setq valid nil)) - (setq i (1- i))) - valid)) - (signal 'error (list "invalid selection" data))) - (if data - (progn -; (mswindows-set-clipboard data) - (setq mswindows-selection-owned-p data)) - (setq mswindows-selection-owned-p nil)) - (setq primary-selection-extent - (select-make-extent-for-selection - data primary-selection-extent)) - (setq zmacs-region-stays t) - data) - -(defun mswindows-disown-selection (&optional secondary-p) - "Assuming we own the selection, disown it. With an argument, discard the -secondary selection instead of the primary selection." - (setq mswindows-selection-owned-p nil) - (mswindows-delete-selection)) - -(defun mswindows-selection-owner-p (&optional selection) - "Return t if current emacs process owns the given Selection. -The arg is ignored." - (not (eq mswindows-selection-owned-p nil)))