;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:52:15 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/term/bg-mouse.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 "`bg-mouse.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@79 *Non-nil for mouse hits to select new window, then execute; else just select.
(defvar bg-mouse-fast-select-window nil (#$ . -623))
(byte-code "\301B\306\302B\307\303B\307\304B\310\305B\311\312B\313\n\314B\315\f\316B\317\301\207" [current-load-list bg-button-r bg-button-m bg-button-c bg-button-l bg-in-modeline 1 2 4 8 bg-in-scrollbar 16 bg-in-minibuf 24 semicolon 59] 2)
#@683 Read, parse, and execute a BBN BitGraph mouse click.

L-- move point             | These apply for mouse click in a window.
--R set mark               | If bg-mouse-fast-select-window is nil,
L-R kill region            | these commands on a nonselected window
-C- move point and yank    | just select that window.
LC- yank-pop		   |
-CR or LCR undo		   | "Scroll bar" is right-hand window column.

on modeline:		    on "scroll bar":	in minibuffer:
L-- scroll-up		    line to top		execute-extended-command
--R scroll-down		    line to bottom	eval-expression
-C- proportional goto-char  line to middle	suspend-emacs

To reinitialize the mouse if the terminal is reset, type ESC : RET
(defalias 'bg-mouse-report #[(prefix-arg) "\306!\210\307 S\306!\310\245^\311 S\306!\312\245Z\306\313!\314\246\315	\n\"\316 \317\f!\n\311 SU\211?\205> \n\3208SU?\205S ?\205S 	\3218SY\f=\205a \f?\211\203l \202m \322\203w \202x \322\\\203\203 \202\204 \322\\ \323!\324 \\!\"\"	@Z#\nA@Z$\204\254 \203\273 \325\f!\210\326\"!\210\325!\202\331 \204\305 \203\314 \326\"!\202\331 \325\f!\210%\205\331 \326\"!.\207" [semicolon screen-mouse-x screen-mouse-y bg-mouse-buttons bg-mouse-window bg-cursor-window bg-get-tty-num frame-width 9 frame-height 16 99 8 bg-window-from-x-y selected-window window-edges 3 2 0 lookup-key char-to-string select-window bg-command-execute edges minibuf-p in-modeline-p in-scrollbar-p same-window-p in-minibuf-p bg-in-minibuf bg-in-modeline bg-in-scrollbar bg-mode-bits mouse-map bg-command bg-mouse-x bg-mouse-y bg-mouse-fast-select-window] 6 (#$ . 1027) "P"])
#@43 Move point to location of BitGraph mouse.
(defalias 'bg-set-point #[nil "\304	\"\210\305\211\207" [bg-mouse-x bg-mouse-y this-command temporary-goal-column bg-move-point-to-x-y next-line] 3 (#$ . 2663) nil])
#@41 Set mark at location of BitGraph mouse.
(defalias 'bg-set-mark #[nil "\302 \210\303	\"\210\304 \207" [bg-mouse-x bg-mouse-y push-mark bg-move-point-to-x-y exchange-point-and-mark] 3 (#$ . 2881) nil])
#@52 Move point to location of BitGraph mouse and yank.
(defalias 'bg-yank #[nil "\303	\"\210\304\304 \207" [bg-mouse-x bg-mouse-y this-command bg-move-point-to-x-y yank] 3 (#$ . 3088) "*"])
(defalias 'yank-pop-1 #[nil "\300\301!\207" [yank-pop 1] 2 nil "*"])
#@96 Move point to location of BitGraph mouse and yank.  If last command
was a yank, do a yank-pop.
(defalias 'bg-yank-or-pop #[nil "\301=\203\n \302\303!\207\304 \207" [last-command yank yank-pop 1 bg-yank] 2 (#$ . 3351) "*"])
(byte-code "\301B\302\301\207" [current-load-list bg-most-positive-fixnum 8388607] 2)
#@134 Go to location in buffer that is the same percentage of the way
through the buffer as the BitGraph mouse's X position in the window.
(defalias 'bg-move-by-percentage #[nil "\302!\203\n \303\202& \304 	\245W\203 \304 _\305 S\245\202& \304 \305 S\245_b\210\306 \210\307 \207" [bg-mouse-x bg-most-positive-fixnum zerop 0 buffer-size window-width beginning-of-line what-cursor-position] 3 (#$ . 3671) nil])
#@76 Scroll the line pointed to by the BitGraph mouse to the top of the window.
(defalias 'bg-mouse-line-to-top #[nil "\301!\207" [bg-mouse-y scroll-up] 2 (#$ . 4085) nil])
#@79 Scroll the line pointed to by the BitGraph mouse to the center 
of the window
(defalias 'bg-mouse-line-to-center #[nil "\301\211\\\302 [\\\303\\\303\245!\207" [bg-mouse-y scroll-up window-height 2] 3 (#$ . 4260) nil])
#@70 Scroll the line pointed to by the mouse to the bottom of the window.
(defalias 'bg-mouse-line-to-bottom #[nil "\301\302\303 Z\\!\207" [bg-mouse-y scroll-up 2 window-height] 4 (#$ . 4485) nil])
(defalias 'bg-kill-region #[nil "\300\301 \302 \"\207" [kill-region region-beginning region-end] 3 nil "*"])
#@144 Insert a copy of the word (actually sexp) that the mouse is pointing at.
Sexp is inserted into the buffer at point (where the text cursor is).
(defalias 'bg-insert-moused-sexp #[nil "\212\304	\"\210\305\306!\203 \307u\210\202 \310\307!\210\212\311\307!\210`)`{)\312!\210\313 \210n\2032 \314 \210\202H \212\315u\210\305\316!?\205@ \305\317!)\204H \320\321!\210\320\n!\210l\206g \305\322!\206g \305\323!\203b \305\324!\206g \212\320\321!))\207" [bg-mouse-x bg-mouse-y moused-text bg-cursor-window bg-move-point-to-x-y looking-at "\\s)" 1 forward-sexp backward-sexp select-window delete-horizontal-space indent-according-to-mode -1 "\\s\"" "[`'\"\\]\\|\\s(" insert-string " " "\\s.\\|\\s)" "'" "\\sw"] 3 (#$ . 4795) nil])
#@156 Read from terminal until TERM-CHAR is read, and return intervening number.
If non-numeric not matching TERM-CHAR, reprogram the mouse and signal an error.
(defalias 'bg-get-tty-num #[(term-char) "\303\304 \305Z\303Y\203\" \306X\203\" 	\307_\\\304 \305Z\211\202 \n\305\\=\2041 \310 \210\311\312!\210	*\207" [char num term-char 0 read-char 48 9 10 bg-program-mouse error "Invalid data format in bg-mouse command: mouse reinitialized."] 4 (#$ . 5526)])
#@95 Position cursor in window coordinates.
X and Y are 0-based character positions in the window.
(defalias 'bg-move-point-to-x-y #[(x y) "\304!\210i\305 	\306V\203 	S\307\n	\\\\!*\207" [y scroll-offset zero-column x move-to-window-line window-hscroll 0 move-to-column] 3 (#$ . 5991)])
#@105 Find window corresponding to screen coordinates.
X and Y are 0-based character positions on the screen.
(defalias 'bg-window-from-x-y #[(x y) "\300\301!\207" [get-window-with-predicate #[(w) "\303	B\n\"\207" [x y w coordinates-in-window-p] 3]] 2 (#$ . 6286)])
(defalias 'bg-command-execute #[(bg-command) "\301!\203\n \302!\207\303 \207" [bg-command commandp command-execute ding] 2])
(defalias 'bg-program-mouse #[nil "\300\301!\207" [send-string-to-terminal ":0;7;;;360;512;9;16;9;16c"] 2])
(byte-code "\301!\204	 \302 \301\207" [mouse-map keymapp make-keymap] 2)
#@43 Bind bg-mouse CLICK-CODE to run FUNCTION.
(defalias 'bind-bg-mouse-click #[(click-code function) "\303\304	!\n#\207" [mouse-map click-code function define-key char-to-string] 4 (#$ . 6864)])
(byte-code "\306\307\"\210\306	\310\"\210\306\n\311\"\210\306	\\\312\"\210\306\n\\\313\"\210\306	\n\\\314\"\210\306	\\\n\\\314\"\210\306\\\315\"\210\306	\\\316\"\210\306\n\\\317\"\210\306\f\\\320\"\210\306\f	\\\321\"\210\306\f\n\\\322\"\210\306\\\323\"\210\306	\\\324\"\210\306\n\\\325\"\210\326\327!\207" [bg-button-l bg-button-m bg-button-r bg-in-modeline bg-in-scrollbar bg-in-minibuf bind-bg-mouse-click bg-set-point bg-yank bg-set-mark yank-pop-1 bg-kill-region undo scroll-up bg-move-by-percentage scroll-down bg-mouse-line-to-top bg-mouse-line-to-center bg-mouse-line-to-bottom execute-extended-command suspend-emacs eval-expression provide bg-mouse] 3)
