;ELC ;;; compiled by cthomp@willow on Thu Aug 12 00:39:02 1993 ;;; from file /era/era-0.80/editor/lisp/packages/bg-mouse.el ;;; emacs version 19.8 (beta8) Lucid. ;;; bytecomp version 2.15; 14-jul-93. ;;; 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 "This file was compiled for Emacs 19.")) (provide 'bg-mouse) (defvar bg-mouse-fast-select-window nil "\ *Non-nil for mouse hits to select new window, then execute; else just select.") (byte-code "\n " [1 bg-button-r 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] 1) (fset 'bg-mouse-report #[(prefix-arg) " ! S !å^ S !ƥZ!ɦ\n \"  ! SU?8SU?? 8SY = ?\\\\\n\\!\" @Z!A@Z\" ! !! ! !% !." [bg-get-tty-num semicolon screen-width 9 screen-mouse-x screen-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 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 "\ 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" "P"]) (fset '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 "\ Move point to location of BitGraph mouse." nil]) (fset 'bg-set-mark #[nil " \n \" " [push-mark bg-move-point-to-x-y bg-mouse-x bg-mouse-y exchange-point-and-mark] 3 "\ Set mark at location of BitGraph mouse." nil]) (fset 'bg-yank #[nil " \n\" " [bg-move-point-to-x-y bg-mouse-x bg-mouse-y yank this-command] 3 "\ Move point to location of BitGraph mouse and yank." "*"]) (fset 'yank-pop-1 #[nil "!" [yank-pop 1] 2 nil "*"]) (fset 'bg-yank-or-pop #[nil "=! " [last-command yank yank-pop 1 bg-yank] 2 "\ Move point to location of BitGraph mouse and yank or yank-pop. Do a yank unless last command was a yank, in which case do a yank-pop." "*"]) (byte-code "" [8388607 bg-most-positive-fixnum] 1) (fset 'bg-move-by-percentage #[nil "U W _ S S_by " [bg-mouse-x 0 buffer-size bg-most-positive-fixnum window-width what-cursor-position] 3 "\ 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." nil]) (fset 'bg-mouse-line-to-top #[nil " !" [scroll-up bg-mouse-y] 2 "\ Scroll the line pointed to by the BitGraph mouse to the top of the window." nil]) (fset 'bg-mouse-line-to-center #[nil " [\\\\\\å!" [scroll-up bg-mouse-y window-height 2] 5 "\ Scroll the line pointed to by the BitGraph mouse to the center of the window" nil]) (fset 'bg-mouse-line-to-bottom #[nil " Z\\!" [scroll-up bg-mouse-y 2 window-height] 4 "\ Scroll the line pointed to by the mouse to the bottom of the window." nil]) (fset 'bg-kill-region #[nil " \"" [kill-region region-beginning region-end] 3 nil "*"]) (fset 'bg-insert-moused-sexp #[nil " \n\"!!`)`{)! n u!?!)!!l!!!!))" [bg-move-point-to-x-y bg-mouse-x bg-mouse-y forward-sexp 1 backward-sexp moused-text select-window bg-cursor-window delete-horizontal-space indent-according-to-mode -1 looking-at "\\s\"" "[`'\"\\]\\|\\s(" insert-string " " "\\s.\\|\\s)" "'" "\\sw"] 3 "\ 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). By gildea 7 Feb 89" nil]) (fset 'bg-get-tty-num #[(term-char) " Z Y X _ \\ Zi \\= ! *" [0 read-char 48 char num 9 10 term-char bg-program-mouse error "Invalid data format in bg-mouse command: mouse reinitialized."] 4 "\ 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."]) (fset 'bg-move-point-to-x-y #[(x y) " !i  V S \\\\!*" [move-to-window-line y window-hscroll scroll-offset zero-column 0 move-to-column x] 4 "\ Position cursor in window coordinates. X and Y are 0-based character positions in the window."]) (fset 'bg-window-from-x-y #[(x y) " \n = A@W 8Y @W 8Y\n!\n!S\n =\n \n*" [window-edges nil window edges selected-window y 3 x 2 next-window] 3 "\ Find window corresponding to screen coordinates. X and Y are 0-based character positions on the screen."]) (byte-code "MM ! " [bg-command-execute #[(bg-command) " ! ! " [commandp bg-command command-execute ding] 2] bg-program-mouse #[nil "!" [send-string-to-terminal ":0;7;;;360;512;9;16;9;16c"] 2] keymapp mouse-map make-keymap] 2) (fset 'bind-bg-mouse-click #[(click-code function) " ! #" [define-key mouse-map char-to-string click-code function] 4 "\ Bind bg-mouse CLICK-CODE to run FUNCTION."]) (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] 4)