Show
Ignore:
Timestamp:
05/13/06 11:31:18 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/avoid.el

    r4037 r4079  
    140140  "Return the position of point as (FRAME X . Y). 
    141141Analogous 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)))) 
    156144    (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))))))) 
    159149 
    160150;(defun mouse-avoidance-point-position-test ()