17517
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 1 ;;; mouse-copy.el --- one-click text copy and move
16321
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 2
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 3 ;; Copyright (C) 1996 Free Software Foundation, Inc.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 4
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 5 ;; Author: John Heidemann <johnh@ISI.EDU>
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 6 ;; Keywords: mouse
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 7
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 8 ;; This file is part of GNU Emacs.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 9
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 10 ;; GNU Emacs is free software; you can redistribute it and/or modify
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 11 ;; it under the terms of the GNU General Public License as published by
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 12 ;; the Free Software Foundation; either version 2, or (at your option)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 13 ;; any later version.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 14
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 15 ;; GNU Emacs is distributed in the hope that it will be useful,
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 18 ;; GNU General Public License for more details.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 19
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 20 ;; You should have received a copy of the GNU General Public License
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 23 ;; Boston, MA 02111-1307, USA.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 24
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 25 ;;; Commentary:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 26
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 27 ;;; What is ``mouse-copy.el''?
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 28 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 29 ;;; It provides one-click text copy and move. Rather than the
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 30 ;;; standard stroke-out-a-region (down-mouse-1, up-mouse-1) followed
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 31 ;;; by a yank (down-mouse-2, up-mouse-2 or C-y), you can now stroke
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 32 ;;; out a region and have it automatically pasted at the current
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 33 ;;; point. You can also move text just as easily. Although the
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 34 ;;; difference may not sound like much, it does make mousing text
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 35 ;;; around a lot easier, IMHO.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 36 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 37 ;;; If you like mouse-copy, you should also check out mouse-drag
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 38 ;;; for ``one-click scrolling''.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 39 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 40 ;;; To use mouse-copy, place the following in your .emacs file:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 41 ;;; (require 'mouse-copy)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 42 ;;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 43 ;;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 44 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 45 ;;; (These definitions override the old binding of M-mouse-1 to
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 46 ;;; mouse-drag-secondary. I find I don't use that command much so its
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 47 ;;; loss is not important, and it can be made up with a M-mouse-1
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 48 ;;; followed by a M-mouse-3. I personally reserve M-mouse bindings
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 49 ;;; for my window manager and bind everything to C-mouse.)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 50 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 51 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 52 ;;; History and related work:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 53 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 54 ;;; One-click copying and moving was inspired by lemacs-19.8.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 55 ;;; Throw-scrolling was inspired by MacPaint's ``hand'' and by Tk's
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 56 ;;; mouse-2 scrolling. The package mouse-scroll.el by Tom Wurgler
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 57 ;;; <twurgler@goodyear.com> is similar to mouse-drag-throw, but
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 58 ;;; doesn't pass clicks through.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 59 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 60 ;;; These functions have been tested in emacs version 19.30,
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 61 ;;; and this package has run in the past on 19.25-19.29.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 62 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 63 ;;; Originally mouse-copy was part of a larger package.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 64 ;;; As of 11 July 96 the scrolling functions were split out
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 65 ;;; in preparation for incorporation into (the future) emacs-19.32.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 66 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 67 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 68 ;;; Known Bugs:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 69 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 70 ;;; - Highlighting is sub-optimal under 19.29 and XFree86-3.1.1
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 71 ;;; (see \\[mouse-copy-work-around-drag-bug] for details).
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 72 ;;; - mouse-drag-secondary-pasting and mouse-drag-secondary-moving
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 73 ;;; require X11R5 (or better) and so fail under older versions
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 74 ;;; of Open Windows (like that present in Solaris/x86 2.1).
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 75 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 76 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 77 ;;; Future plans:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 78 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 79 ;;; I read about the chording features of Plan-9's Acme environment at
18027
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 80 ;;; <http://www.zip.com.au/~cs/app/wily/auug.html>. I'd like
16321
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 81 ;;; to incorporate some of these ideas into mouse-copy. The only
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 82 ;;; lose is that this is not the current Emacs Way Of Doing Things, so
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 83 ;;; there would be a learning curve for existing emacs users.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 84 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 85 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 86 ;;; Thanks:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 87 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 88 ;;; Thanks to Kai Grossjohann
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 89 ;;; <grossjoh@dusty.informatik.uni-dortmund.de> for reporting bugs, to
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 90 ;;; Tom Wurgler <twurgler@goodyear.com> for reporting bugs and
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 91 ;;; suggesting fixes, and to Joel Graber <jgraber@ti.com> for
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 92 ;;; prompting me to do drag-scrolling and for an initial
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 93 ;;; implementation of horizontal drag-scrolling.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 94 ;;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 95 ;;; -johnh, 11-Jul-96
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 96
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 97 ;;; Code:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 98
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 99 ;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 100 ;; move/paste code
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 101 ;;
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 102
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 103 (defvar mouse-copy-last-paste-start nil
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 104 "Internal to `mouse-drag-secondary-pasting'.")
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 105 (defvar mouse-copy-last-paste-end nil
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 106 "Internal to `mouse-drag-secondary-pasting'.")
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 107
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 108 (defvar mouse-copy-have-drag-bug nil
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 109 "Set to enable mouse-copy-work-around-drag-bug.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 110 See `mouse-copy-work-around-drag-bug' for details.")
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 111
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 112 (defun mouse-copy-work-around-drag-bug (start-event end-event)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 113 "Code to work around a bug in post-19.29 emacs: it drops mouse-drag events.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 114 The problem occurs under XFree86-3.1.1 (X11R6pl11) but not under X11R5,
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 115 and under post-19.29 but not early versions of emacs.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 116
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 117 19.29 and 19.30 seems to drop mouse drag events
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 118 sometimes. (Reproducable under XFree86-3.1.1 (X11R6pl11) and
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 119 XFree86-3.1.2 under Linux 1.2.x. Doesn't occur under X11R5 and SunOS
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 120 4.1.1.)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 121
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 122 To see if you have the problem:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 123 Disable this routine (with (setq mouse-copy-have-drag-bug nil))..
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 124 Click and drag for a while.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 125 If highlighting stops tracking, you have the bug.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 126 If you have the bug (or the real fix :-), please let me know."
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 127
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 128 ;; To work-around, call mouse-set-secondary with a fake
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 129 ;; drag event to set the overlay,
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 130 ;; the load the x-selection.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 131 (save-excursion
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 132 (let*
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 133 ((start-posn (event-start start-event))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 134 (end-posn (event-end end-event))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 135 (end-buffer (window-buffer (posn-window end-posn)))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 136 ;; First, figure out the region (left as point/mark).
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 137 (range (progn
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 138 (set-buffer end-buffer)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 139 (mouse-start-end (posn-point start-posn)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 140 (posn-point end-posn)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 141 (1- (event-click-count start-event)))))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 142 (beg (car range))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 143 (end (car (cdr range))))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 144 ;; Second, set the overlay.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 145 (if mouse-secondary-overlay
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 146 (move-overlay mouse-secondary-overlay beg end)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 147 (setq mouse-secondary-overlay (make-overlay beg (posn-point end))))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 148 (overlay-put mouse-secondary-overlay 'face 'secondary-selection)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 149 ;; Third, set the selection.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 150 ;; (setq me-beg beg me-end end me-range range) ; for debugging
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 151 (set-buffer end-buffer)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 152 (x-set-selection 'SECONDARY (buffer-substring beg end)))))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 153
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 154
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 155 (defun mouse-drag-secondary-pasting (start-event)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 156 "Drag out a secondary selection, then paste it at the current point.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 157
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 158 To test this function, evaluate:
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 159 (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 160 put the point at one place, then click and drag over some other region."
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 161 (interactive "e")
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 162 ;; Work-around: We see and react to each part of a multi-click event
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 163 ;; as it proceeds. For a triple-event, this means the double-event
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 164 ;; has already copied something that the triple-event will re-copy
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 165 ;; (a Bad Thing). We therefore undo the prior insertion if we're on
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 166 ;; a multiple event.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 167 (if (and mouse-copy-last-paste-start
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 168 (>= (event-click-count start-event) 2))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 169 (delete-region mouse-copy-last-paste-start
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 170 mouse-copy-last-paste-end))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 171
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 172 ;; HACK: We assume that mouse-drag-secondary returns nil if
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 173 ;; there's no secondary selection. This assumption holds as of
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 174 ;; emacs-19.22 but is not documented. It's not clear that there's
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 175 ;; any other way to get this information.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 176 (if (mouse-drag-secondary start-event)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 177 (progn
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 178 (if mouse-copy-have-drag-bug
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 179 (mouse-copy-work-around-drag-bug start-event last-input-event))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 180 ;; Remember what we do so we can undo it, if necessary.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 181 (setq mouse-copy-last-paste-start (point))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 182 (insert (x-get-selection 'SECONDARY))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 183 (setq mouse-copy-last-paste-end (point)))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 184 (setq mouse-copy-last-paste-start nil)))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 185
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 186
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 187 (defun mouse-kill-preserving-secondary ()
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 188 "Kill the text in the secondary selection, but leave the selection set.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 189
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 190 This command is like \\[mouse-kill-secondary] (that is, the secondary
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 191 selection is deleted and placed in the kill ring), except that it also
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 192 leaves the secondary buffer active on exit.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 193
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 194 This command was derived from mouse-kill-secondary in emacs-19.28
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 195 by johnh@ficus.cs.ucla.edu."
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 196 (interactive)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 197 (let* ((keys (this-command-keys))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 198 (click (elt keys (1- (length keys)))))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 199 (or (eq (overlay-buffer mouse-secondary-overlay)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 200 (if (listp click)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 201 (window-buffer (posn-window (event-start click)))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 202 (current-buffer)))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 203 (error "Select or click on the buffer where the secondary selection is")))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 204 (save-excursion
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 205 (set-buffer (overlay-buffer mouse-secondary-overlay))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 206 (kill-region (overlay-start mouse-secondary-overlay)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 207 (overlay-end mouse-secondary-overlay)))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 208 ;; (delete-overlay mouse-secondary-overlay)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 209 ;; (x-set-selection 'SECONDARY nil)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 210 ;; (setq mouse-secondary-overlay nil)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 211 )
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 212
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 213 (defun mouse-drag-secondary-moving (start-event)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 214 "Sweep out a secondary selection, then move it to the current point."
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 215 (interactive "e")
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 216 ;; HACK: We assume that mouse-drag-secondary returns nil if
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 217 ;; there's no secondary selection. This works as of emacs-19.22.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 218 ;; It's not clear that there's any other way to get this information.
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 219 (if (mouse-drag-secondary start-event)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 220 (progn
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 221 (mouse-kill-preserving-secondary)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 222 (insert (x-get-selection 'SECONDARY))))
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 223 )
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 224
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 225 (provide 'mouse-copy)
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 226
+ ��膩��鰹申鐃順�渇����紮�鐃醇�鐃緒申鐃緒申����鐃初��膩��鰹申鐃順�渇��膩��� 227 ;;; mouse-copy.el ends here