X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4f9d7df139695e97cd1772d41940500480585df7..88312cfc5990060c2d5d54002774ef07e354dd12:/lisp/mouse-copy.el diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el index 9495ca55c2..e20c5908f0 100644 --- a/lisp/mouse-copy.el +++ b/lisp/mouse-copy.el @@ -1,7 +1,6 @@ ;;; mouse-copy.el --- one-click text copy and move -;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2013 Free Software Foundation, Inc. ;; Author: John Heidemann ;; Keywords: mouse @@ -36,7 +35,7 @@ ;; 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) @@ -200,8 +199,7 @@ by johnh@ficus.cs.ucla.edu." (window-buffer (posn-window (event-start click))) (current-buffer))) (error "Select or click on the buffer where the secondary selection is"))) - (save-excursion - (set-buffer (overlay-buffer mouse-secondary-overlay)) + (with-current-buffer (overlay-buffer mouse-secondary-overlay) (kill-region (overlay-start mouse-secondary-overlay) (overlay-end mouse-secondary-overlay))) ;; (delete-overlay mouse-secondary-overlay) @@ -223,5 +221,4 @@ by johnh@ficus.cs.ucla.edu." (provide 'mouse-copy) -;; arch-tag: 3d50293b-c089-4273-b412-4fc96a5f26ff ;;; mouse-copy.el ends here