]> git.eshelyaron.com Git - emacs.git/commitdiff
(posn-col-row): Heed frame parameter `line-spacing' and
authorJohn Paul Wallington <jpw@pobox.com>
Tue, 11 Mar 2003 12:49:20 +0000 (12:49 +0000)
committerJohn Paul Wallington <jpw@pobox.com>
Tue, 11 Mar 2003 12:49:20 +0000 (12:49 +0000)
`default-line-spacing', rather than buffer-local `line-spacing'.

lisp/ChangeLog
lisp/subr.el

index 1eb657773cd9cc2ff09c8239863c7bf0ce094840..57f989ab7f7691e6d179e8c552a9833715457104 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-11  John Paul Wallington  <jpw@gnu.org>
+
+       * subr.el (posn-col-row): Heed frame parameter `line-spacing' and
+       `default-line-spacing', rather than buffer-local `line-spacing'.
+
 2003-03-10  Per Abrahamsen  <abraham@dina.kvl.dk>
 
        * cus-edit.el (customize-rogue): New command.
index 29afbecb1e5a002a41f533e9c4384aaebb0d0b66..11e6869ffcd90c1d87ce0d9fc17f9a37f0650789 100644 (file)
@@ -657,9 +657,8 @@ For a scroll-bar event, the result column is 0, and the row
 corresponds to the vertical position of the click in the scroll bar."
   (let* ((pair   (nth 2 position))
         (window (posn-window position))
-        (vspacing (or (buffer-local-value 'line-spacing 
-                                          (window-buffer window))
-                      0)))
+        (vspacing (or (frame-parameter (window-frame window) 'line-spacing)
+                      default-line-spacing)))
     (if (eq (if (consp (nth 1 position))
                (car (nth 1 position))
              (nth 1 position))
@@ -672,7 +671,8 @@ corresponds to the vertical position of the click in the scroll bar."
          (cons (scroll-bar-scale pair (window-width window)) 0)
        (let* ((frame (if (framep window) window (window-frame window)))
               (x (/ (car pair) (frame-char-width frame)))
-              (y (/ (cdr pair) (+ (frame-char-height frame) vspacing))))
+              (y (/ (cdr pair) (+ (frame-char-height frame)
+                                  (or vspacing 0)))))
          (cons x y))))))
 
 (defsubst posn-timestamp (position)