;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:21:18 2007 ;;; from file /home/cyd/emacs/lisp/xt-mouse.el ;;; in Emacs version 22.0.99 ;;; 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 "`xt-mouse.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\303\304\305#\210\306\307\211\203\n@\310 \311\312#\210\nA\211\204*\307\207" [function-key-map event-type #:--cl-dolist-temp-- define-key "" xterm-mouse-translate (mouse-1 mouse-2 mouse-3 M-down-mouse-1 M-down-mouse-2 M-down-mouse-3) nil put event-kind mouse-click] 5) #@44 Read a click and release event from XTerm. (defalias 'xterm-mouse-translate #[(event) "\212\300\213)\207" [((byte-code "\306=\203 \307\202\203\307\310\311!\210\307\312 \211@ A@\211A@\3139\2035\314\f\"\2028\314\f!!\315\316\317 @!\"\211\204a\320 \321=\203]\320 \322=\203]\320 \323=\204a\324\325!\210\203j \202l\312 \211@ A@\211!A@\"\326>\203\243\"9\203\234\":\203\234\314\"!D\"\202\346\314!\202\346\"=\203\261C\202\313\327!D9\203\277\330\202\312\331\332\333\nT\"! !ED#9\203\343:\203\343\314 D \"\202\346\314 !. \207" [transient-mark-mode mark-active xterm-mouse-last down down-command down-data lambda nil run-hooks deactivate-mark-hook xterm-mouse-event key-binding vector string-match "^mouse" symbol-name read-char 27 91 77 error "Unexpected escape sequence from XTerm" (nil ignore) mouse-movement 0 intern format "drag-mouse-%d" down-where down-binding is-click click click-command click-data click-where unread-command-events] 6))] 1 (#$ . 855)]) #@59 Position of last xterm mouse event relative to the frame. (defvar xterm-mouse-x 0 (#$ . 1889)) #@59 Position of last xterm mouse event relative to the frame. (defvar xterm-mouse-y 0 (#$ . 1990)) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list xt-mouse-epoch default-boundp set-default nil] 3) #@57 Bound to `mouse-position-function' in XTerm mouse mode. (defalias 'xterm-mouse-position-function #[(pos) " \nB\241\210\207" [pos xterm-mouse-x xterm-mouse-y] 3 (#$ . 2222)]) (defalias 'xterm-mouse-event-read #[nil "\301 \211\302W\203\303\\\202)\207" [c read-char 0 134217856] 3]) #@49 Convert XTerm mouse event to Emacs mouse event. (defalias 'xterm-mouse-event #[nil "\306 \307Z\306 \310Z\306 \310Z\311\312 \206\312 \211Z\313_!\314\315Y\203/\316\317\320Z\"\202d\321>\203@\316\322\323Z\"\202d\324U\203O\316\317 \323Z\"\202d\325U\203]\316\317 T\"\202d\316\326T\"!\327 \n\"\330!\211 @! A@\" #\n$\203\232\331 !Z\n\"Z\332$\202\245\333\334\335D\331 \n\"AA\"%\325%\233\f\240\210%)D\211&. \207" [type x y xt-mouse-epoch timestamp xterm-mouse-last xterm-mouse-event-read 32 33 truncate float-time 1000 intern 64 format "mouse-%d" 60 (8 9 10) "M-down-mouse-%d" 7 11 3 "down-mouse-%d" window-at window-edges posn-at-x-y t append nil menu-bar mouse w ltrb left top xterm-mouse-x xterm-mouse-y event last-input-event] 7 (#$ . 2517)]) #@269 Non-nil if Xterm-Mouse mode is enabled. See the command `xterm-mouse-mode' for a description of this minor-mode. Setting this variable directly does not take effect; either customize it (see the info node `Easy Customization') or call the function `xterm-mouse-mode'. (custom-declare-variable 'xterm-mouse-mode 'nil '(#$ . 3314) :set 'custom-set-minor-mode :initialize 'custom-initialize-default :group 'mouse :type 'boolean) #@479 Toggle XTerm mouse mode. With prefix arg, turn XTerm mouse mode on iff arg is positive. Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. This works in terminal emulators compatible with xterm. It only works for simple uses of the mouse. Basically, only non-modified single clicks are supported. When turned on, the normal xterm mouse functionality for such clicks is still available by holding down the SHIFT key while pressing the mouse button. (defalias 'xterm-mouse-mode #[(&optional arg) "\304=\203 ?\202%\203\305!\306V\202% \204\307\202%\310\311\301\"\210\312\211\2036\n\204<\313\314 \210\202<\315\316!\210\312\317\320 \203F\321\202G\322\"\210\323 \203_\324\301!\210\310\325 \203\\\326\202]\327\"\210\330 \210 \207" [arg xterm-mouse-mode window-system mouse-position-function toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil xterm-mouse-position-function turn-on-xterm-mouse-tracking turn-off-xterm-mouse-tracking force run-hooks xterm-mouse-mode-hook xterm-mouse-mode-on-hook xterm-mouse-mode-off-hook called-interactively-p customize-mark-as-set "Xterm-Mouse mode %sabled" "en" "dis" force-mode-line-update] 4 (#$ . 3747) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\207" [add-minor-mode xterm-mouse-mode nil boundp xterm-mouse-mode-map] 5) #@39 Enable Emacs mouse tracking in xterm. (defalias 'turn-on-xterm-mouse-tracking #[nil "\205\301\302!\207" [xterm-mouse-mode send-string-to-terminal "[?1000h"] 2 (#$ . 5146)]) #@40 Disable Emacs mouse tracking in xterm. (defalias 'turn-off-xterm-mouse-tracking #[(&optional force) "\204 \205 \302\303!\207" [force xterm-mouse-mode send-string-to-terminal "[?1000l"] 2 (#$ . 5329)]) (byte-code "\300\301\302\"\210\300\303\304\"\210\300\305\302\"\210\306\307!\207" [add-hook suspend-hook turn-off-xterm-mouse-tracking suspend-resume-hook turn-on-xterm-mouse-tracking kill-emacs-hook provide xt-mouse] 3)