/[emacs]/emacs/lisp/term/bg-mouse.el
ViewVC logotype

Diff of /emacs/lisp/term/bg-mouse.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by pj, Mon Nov 26 16:17:44 2001 UTC revision 1.12.4.1 by miles, Fri Apr 4 06:20:37 2003 UTC
# Line 74  To reinitialize the mouse if the termina Line 74  To reinitialize the mouse if the termina
74        ((screen-mouse-x (min (1- (frame-width))  ;don't hit column 86!        ((screen-mouse-x (min (1- (frame-width))  ;don't hit column 86!
75                              (/ (bg-get-tty-num semicolon) 9)))                              (/ (bg-get-tty-num semicolon) 9)))
76         (screen-mouse-y (- (1- (frame-height)) ;assume default font size.         (screen-mouse-y (- (1- (frame-height)) ;assume default font size.
77                            (/ (bg-get-tty-num semicolon) 16)))                            (/ (bg-get-tty-num semicolon) 16)))
78         (bg-mouse-buttons (% (bg-get-tty-num ?c) 8))         (bg-mouse-buttons (% (bg-get-tty-num ?c) 8))
79         (bg-mouse-window (bg-window-from-x-y screen-mouse-x screen-mouse-y))         (bg-mouse-window (bg-window-from-x-y screen-mouse-x screen-mouse-y))
80         (bg-cursor-window (selected-window))         (bg-cursor-window (selected-window))
# Line 171  through the buffer as the BitGraph mouse Line 171  through the buffer as the BitGraph mouse
171    (scroll-up bg-mouse-y))    (scroll-up bg-mouse-y))
172    
173  (defun bg-mouse-line-to-center ()  (defun bg-mouse-line-to-center ()
174    "Scroll the line pointed to by the BitGraph mouse to the center    "Scroll the line pointed to by the BitGraph mouse to the center
175  of the window"  of the window"
176    (interactive)    (interactive)
177    (scroll-up (/ (+ 2 bg-mouse-y bg-mouse-y (- (window-height))) 2)))    (scroll-up (/ (+ 2 bg-mouse-y bg-mouse-y (- (window-height))) 2)))
# Line 255  X and Y are 0-based character positions Line 255  X and Y are 0-based character positions
255  (defun bg-window-from-x-y (x y)  (defun bg-window-from-x-y (x y)
256    "Find window corresponding to screen coordinates.    "Find window corresponding to screen coordinates.
257  X and Y are 0-based character positions on the screen."  X and Y are 0-based character positions on the screen."
258    (get-window-with-predicate (lambda (w)    (get-window-with-predicate (lambda (w)
259                                 (coordinates-in-window-p (cons x y) w))))                                 (coordinates-in-window-p (cons x y) w))))
260    
261  (defun bg-command-execute (bg-command)  (defun bg-command-execute (bg-command)
# Line 277  X and Y are 0-based character positions Line 277  X and Y are 0-based character positions
277    "Bind bg-mouse CLICK-CODE to run FUNCTION."    "Bind bg-mouse CLICK-CODE to run FUNCTION."
278    (define-key mouse-map (char-to-string click-code) function))    (define-key mouse-map (char-to-string click-code) function))
279    
280  (bind-bg-mouse-click bg-button-l 'bg-set-point)  (bind-bg-mouse-click bg-button-l 'bg-set-point)
281  (bind-bg-mouse-click bg-button-m 'bg-yank)  (bind-bg-mouse-click bg-button-m 'bg-yank)
282  (bind-bg-mouse-click bg-button-r 'bg-set-mark)  (bind-bg-mouse-click bg-button-r 'bg-set-mark)
283  (bind-bg-mouse-click (+ bg-button-l bg-button-m) 'yank-pop-1)  (bind-bg-mouse-click (+ bg-button-l bg-button-m) 'yank-pop-1)

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.12.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26