/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

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

revision 1.341 by monnier, Thu Feb 20 20:07:41 2003 UTC revision 1.342 by jpw, Mon Mar 10 13:25:42 2003 UTC
# Line 655  POSITION should be a list of the form Line 655  POSITION should be a list of the form
655  as returned by the `event-start' and `event-end' functions.  as returned by the `event-start' and `event-end' functions.
656  For a scroll-bar event, the result column is 0, and the row  For a scroll-bar event, the result column is 0, and the row
657  corresponds to the vertical position of the click in the scroll bar."  corresponds to the vertical position of the click in the scroll bar."
658    (let ((pair   (nth 2 position))    (let* ((pair   (nth 2 position))
659          (window (posn-window position)))           (window (posn-window position))
660             (vspacing (or (buffer-local-value 'line-spacing
661                                               (window-buffer window))
662                           0)))
663      (if (eq (if (consp (nth 1 position))      (if (eq (if (consp (nth 1 position))
664                  (car (nth 1 position))                  (car (nth 1 position))
665                (nth 1 position))                (nth 1 position))
# Line 669  corresponds to the vertical position of Line 672  corresponds to the vertical position of
672            (cons (scroll-bar-scale pair (window-width window)) 0)            (cons (scroll-bar-scale pair (window-width window)) 0)
673          (let* ((frame (if (framep window) window (window-frame window)))          (let* ((frame (if (framep window) window (window-frame window)))
674                 (x (/ (car pair) (frame-char-width frame)))                 (x (/ (car pair) (frame-char-width frame)))
675                 (y (/ (cdr pair) (frame-char-height frame))))                 (y (/ (cdr pair) (+ (frame-char-height frame) vspacing))))
676            (cons x y))))))            (cons x y))))))
677    
678  (defsubst posn-timestamp (position)  (defsubst posn-timestamp (position)

Legend:
Removed from v.1.341  
changed lines
  Added in v.1.342

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