;;; mouse-copy.el --- one-click text copy and move
-;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2014 Free Software Foundation, Inc.
;; Author: John Heidemann <johnh@ISI.EDU>
;; Keywords: mouse
;; If you like mouse-copy, you should also check out mouse-drag
;; for ``one-click scrolling''.
;;
-;; To use mouse-copy, place the following in your .emacs file:
+;; To use mouse-copy, place the following in your init file:
;; (require 'mouse-copy)
;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting)
;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving)
;; Third, set the selection.
;; (setq me-beg beg me-end end me-range range) ; for debugging
(set-buffer end-buffer)
- (x-set-selection 'SECONDARY (buffer-substring beg end)))))
+ (gui-set-selection 'SECONDARY (buffer-substring beg end)))))
(defun mouse-drag-secondary-pasting (start-event)
(kill-region (overlay-start mouse-secondary-overlay)
(overlay-end mouse-secondary-overlay)))
;; (delete-overlay mouse-secondary-overlay)
- ;; (x-set-selection 'SECONDARY nil)
+ ;; (gui-set-selection 'SECONDARY nil)
;; (setq mouse-secondary-overlay nil)
)