Changeset 4079 for trunk/lisp/avoid.el
- Timestamp:
- 05/13/06 11:31:18 (3 years ago)
- Files:
-
- trunk/lisp/avoid.el (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/avoid.el
r4037 r4079 140 140 "Return the position of point as (FRAME X . Y). 141 141 Analogous to `mouse-position'." 142 (let* ((w (selected-window)) 143 (edges (window-inside-edges w)) 144 (list 145 (compute-motion (max (window-start w) (point-min)) ; start pos 146 ;; window-start can be < point-min if the 147 ;; latter has changed since the last redisplay 148 '(0 . 0) ; start XY 149 (point) ; stop pos 150 nil ; stop XY: none 151 nil ; width 152 (cons (window-hscroll w) 0) ; 0 may not be right? 153 (selected-window)))) 154 ;; compute-motion returns (pos HPOS VPOS prevhpos contin) 155 ;; we want: (frame hpos . vpos) 142 (let ((edges (window-inside-edges)) 143 (x-y (posn-x-y (posn-at-point)))) 156 144 (cons (selected-frame) 157 (cons (+ (car edges) (car (cdr list))) 158 (+ (car (cdr edges)) (car (cdr (cdr list)))))))) 145 (cons (+ (car edges) 146 (/ (car x-y) (frame-char-width))) 147 (+ (car (cdr edges)) 148 (/ (cdr x-y) (frame-char-height))))))) 159 149 160 150 ;(defun mouse-avoidance-point-position-test ()
