;ELC ;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:48:15 2003 ;;; from file /home/pot/gnu/emacs-pretest.new/lisp/mouse-copy.el ;;; in Emacs version 21.3 ;;; with bytecomp version 2.85.4.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`mouse-copy.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@45 Internal to `mouse-drag-secondary-pasting'. (defvar mouse-copy-last-paste-start nil (#$ . 622)) #@45 Internal to `mouse-drag-secondary-pasting'. (defvar mouse-copy-last-paste-end nil (#$ . 724)) #@99 Set to enable mouse-copy-work-around-drag-bug. See `mouse-copy-work-around-drag-bug' for details. (defvar mouse-copy-have-drag-bug nil (#$ . 824)) #@629 Code to work around a bug in post-19.29 emacs: it drops mouse-drag events. The problem occurs under XFree86-3.1.1 (X11R6pl11) but not under X11R5, and under post-19.29 but not early versions of emacs. 19.29 and 19.30 seems to drop mouse drag events sometimes. (Reproducible under XFree86-3.1.1 (X11R6pl11) and XFree86-3.1.2 under Linux 1.2.x. Doesn't occur under X11R5 and SunOS 4.1.1.) To see if you have the problem: Disable this routine (with (setq mouse-copy-have-drag-bug nil)). Click and drag for a while. If highlighting stops tracking, you have the bug. If you have the bug (or the real fix :-), please let me know. (defalias 'mouse-copy-work-around-drag-bug #[(start-event end-event) "\212\306 8) \307 8:\203\307\202\306 8)\310\f\311 8)!\211q\210\312\n\306 8:\2038\306 8@\202;\306 8)\f\306 8:\203L\306 8@\202O\306 8)\307 8\250\203_\307 8\202`\306)S#\211@A@\203\200\313#\210\202\233\314\306 8:\203\224\306 8@\202\227\306 8)\"\315\316\317#\210q\210\320\321{\".\207" [start-event event start-posn end-event end-posn position 1 2 window-buffer 0 mouse-start-end move-overlay make-overlay overlay-put face secondary-selection x-set-selection SECONDARY end-buffer range beg end mouse-secondary-overlay] 6 (#$ . 978)]) #@240 Drag out a secondary selection, then paste it at the current point. To test this function, evaluate: (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting) put the point at one place, then click and drag over some other region. (defalias 'mouse-drag-secondary-pasting #[(start-event) "\203 \306\n8\250\203\306\n8\202\307)\306Y\203 |\210\310 !\2038\f\203-\311 \"\210`\312\313!c\210`\211\207\314\211\207" [mouse-copy-last-paste-start start-event event mouse-copy-last-paste-end mouse-copy-have-drag-bug last-input-event 2 1 mouse-drag-secondary mouse-copy-work-around-drag-bug x-get-selection SECONDARY nil] 3 (#$ . 2268) "e"]) #@352 Kill the text in the secondary selection, but leave the selection set. This command is like \[mouse-kill-secondary] (that is, the secondary selection is deleted and placed in the kill ring), except that it also leaves the secondary buffer active on exit. This command was derived from mouse-kill-secondary in emacs-19.28 by johnh@ficus.cs.ucla.edu. (defalias 'mouse-kill-preserving-secondary #[nil "\303 \211\211GS\234\304\n! <\203\305\306\307 !!!\202p=\204$\310\311!\210*\212\304\n!q\210\312\313\n!\314\n!\")\207" [keys click mouse-secondary-overlay this-command-keys overlay-buffer window-buffer posn-window event-start error "Select or click on the buffer where the secondary selection is" kill-region overlay-start overlay-end] 6 (#$ . 2929) nil]) #@69 Sweep out a secondary selection, then move it to the current point. (defalias 'mouse-drag-secondary-moving #[(start-event) "\301!\205 \302 \210\303\304!c\207" [start-event mouse-drag-secondary mouse-kill-preserving-secondary x-get-selection SECONDARY] 2 (#$ . 3696) "e"]) (provide 'mouse-copy)