;ELC   
;;; compiled by rms@churchy.gnu.ai.mit.edu on Thu Apr 20 22:06:11 1995
;;; from file /gd/gnu/emacs/19.0/lisp/term/bg-mouse.el
;;; emacs version 19.28.90.4.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "`/gd/gnu/emacs/19.0/lisp/term/bg-mouse.el' was compiled for Emacs 19"))


#@79 *Non-nil for mouse hits to select new window, then execute; else just select.
(defvar bg-mouse-fast-select-window nil (#$ . -497))
(byte-code "\nB\nB\nB\nB	\nB\nB\nB\nB" [1 bg-button-r current-load-list 2 bg-button-m bg-button-c 4 bg-button-l 8 bg-in-modeline 16 bg-in-scrollbar 24 bg-in-minibuf 59 semicolon] 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) "	! S	!å^ S	!ƥZ!ɦ\n\f\"\f \f! SU?F 8SU?[ ?[ \f8SY\f=l \f?w x     \\\\\n\\!\"!\f@Z\"A@Z#  \f!!!!   !! \f!& !!." [bg-get-tty-num semicolon frame-width 9 screen-mouse-x frame-height 16 screen-mouse-y 99 8 bg-mouse-buttons bg-window-from-x-y bg-mouse-window selected-window bg-cursor-window window-edges edges screen-height minibuf-p 3 in-modeline-p 2 in-scrollbar-p same-window-p in-minibuf-p bg-in-minibuf 0 bg-in-modeline bg-in-scrollbar bg-mode-bits lookup-key mouse-map char-to-string bg-command bg-mouse-x bg-mouse-y select-window bg-command-execute bg-mouse-fast-select-window] 6 (#$ . 855) "P"])
#@43 Move point to location of BitGraph mouse.
(defalias 'bg-set-point #[nil "	\n\"	" [bg-move-point-to-x-y bg-mouse-x bg-mouse-y next-line this-command temporary-goal-column] 3 (#$ . 2330) nil])
#@41 Set mark at location of BitGraph mouse.
(defalias 'bg-set-mark #[nil " \n\" " [push-mark bg-move-point-to-x-y bg-mouse-x bg-mouse-y exchange-point-and-mark] 3 (#$ . 2534) nil])
#@52 Move point to location of BitGraph mouse and yank.
(defalias 'bg-yank #[nil "	\n\" " [bg-move-point-to-x-y bg-mouse-x bg-mouse-y yank this-command] 3 (#$ . 2724) "*"])
(defalias 'yank-pop-1 #[nil "!" [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 "=\n ! " [last-command yank yank-pop 1 bg-yank] 2 (#$ . 2964) "*"])
(byte-code "\nB" [8388607 bg-most-positive-fixnum current-load-list] 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 "U\n &  W  _ S&   S_by " [bg-mouse-x 0 buffer-size bg-most-positive-fixnum window-width what-cursor-position] 3 (#$ . 3252) nil])
#@76 Scroll the line pointed to by the BitGraph mouse to the top of the window.
(defalias 'bg-mouse-line-to-top #[nil "	!" [scroll-up bg-mouse-y] 2 (#$ . 3585) nil])
#@79 Scroll the line pointed to by the BitGraph mouse to the center 
of the window
(defalias 'bg-mouse-line-to-center #[nil "	 [\\\\\\å!" [scroll-up bg-mouse-y window-height 2] 5 (#$ . 3754) nil])
#@70 Scroll the line pointed to by the mouse to the bottom of the window.
(defalias 'bg-mouse-line-to-bottom #[nil "	 Z\\!" [scroll-up bg-mouse-y 2 window-height] 4 (#$ . 3958) nil])
(defalias 'bg-kill-region #[nil "  \"" [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 "	\n\"! u !!`)`{)\n! n4  J u!?B !)J !!lj !j !e !j !))" [bg-move-point-to-x-y bg-mouse-x bg-mouse-y looking-at "\\s)" 1 forward-sexp backward-sexp moused-text select-window bg-cursor-window delete-horizontal-space indent-according-to-mode -1 "\\s\"" "[`'\"\\]\\|\\s(" insert-string " " "\\s.\\|\\s)" "'" "\\sw"] 3 (#$ . 4244) 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) " ZY\" X\" \f_\\ Z \\=2  !\f*" [0 read-char 48 char num 9 10 term-char bg-program-mouse error "Invalid data format in bg-mouse command: mouse reinitialized."] 4 (#$ . 4823)])
#@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) "	!i V S\f\\\\!*" [move-to-window-line y window-hscroll scroll-offset zero-column 0 move-to-column x] 4 (#$ . 5230)])
#@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) " \n =8 A@W- 8Y- @W- 8Y8 \n!\n! \n =C M \nL  M \n*" [window-edges nil window edges selected-window y 3 x 2 next-window] 3 (#$ . 5505)])
(defalias 'bg-command-execute #[(bg-command) "	!\n 	! " [commandp bg-command command-execute ding] 2])
(defalias 'bg-program-mouse #[nil "!" [send-string-to-terminal ":0;7;;;360;512;9;16;9;16c"] 2])
(byte-code "	!	  " [keymapp mouse-map make-keymap] 2)
#@43 Bind bg-mouse CLICK-CODE to run FUNCTION.
(defalias 'bind-bg-mouse-click #[(click-code function) "	!\f#" [define-key mouse-map char-to-string click-code function] 4 (#$ . 6094)])
(byte-code "	\"\"\"	\\\"	\\\"\\\"	\\\\\"\n	\\\"\n\\\"\n\\\"	\\\"\\\"\\\"	\\\"\\\"\\\"!" [bind-bg-mouse-click bg-button-l bg-set-point bg-button-m bg-yank bg-button-r bg-set-mark yank-pop-1 bg-kill-region undo bg-in-modeline scroll-up bg-move-by-percentage scroll-down bg-in-scrollbar bg-mouse-line-to-top bg-mouse-line-to-center bg-mouse-line-to-bottom bg-in-minibuf execute-extended-command suspend-emacs eval-expression provide bg-mouse] 4)
