aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJohn Paul Wallington2003-03-11 12:49:20 +0000
committerJohn Paul Wallington2003-03-11 12:49:20 +0000
commitee24a85250b99a13292675ce030b5d88eb4a619b (patch)
tree1f5a6b2aff05cc6c9e08e64ee822239e72d8b122 /lisp
parent963c2e09c084d528cd0432eb7c039c374816df3c (diff)
downloademacs-ee24a85250b99a13292675ce030b5d88eb4a619b.tar.gz
emacs-ee24a85250b99a13292675ce030b5d88eb4a619b.zip
(posn-col-row): Heed frame parameter `line-spacing' and
`default-line-spacing', rather than buffer-local `line-spacing'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/subr.el8
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1eb657773cd..57f989ab7f7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12003-03-11 John Paul Wallington <jpw@gnu.org>
2
3 * subr.el (posn-col-row): Heed frame parameter `line-spacing' and
4 `default-line-spacing', rather than buffer-local `line-spacing'.
5
12003-03-10 Per Abrahamsen <abraham@dina.kvl.dk> 62003-03-10 Per Abrahamsen <abraham@dina.kvl.dk>
2 7
3 * cus-edit.el (customize-rogue): New command. 8 * cus-edit.el (customize-rogue): New command.
diff --git a/lisp/subr.el b/lisp/subr.el
index 29afbecb1e5..11e6869ffcd 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -657,9 +657,8 @@ For a scroll-bar event, the result column is 0, and the row
657corresponds to the vertical position of the click in the scroll bar." 657corresponds to the vertical position of the click in the scroll bar."
658 (let* ((pair (nth 2 position)) 658 (let* ((pair (nth 2 position))
659 (window (posn-window position)) 659 (window (posn-window position))
660 (vspacing (or (buffer-local-value 'line-spacing 660 (vspacing (or (frame-parameter (window-frame window) 'line-spacing)
661 (window-buffer window)) 661 default-line-spacing)))
662 0)))
663 (if (eq (if (consp (nth 1 position)) 662 (if (eq (if (consp (nth 1 position))
664 (car (nth 1 position)) 663 (car (nth 1 position))
665 (nth 1 position)) 664 (nth 1 position))
@@ -672,7 +671,8 @@ corresponds to the vertical position of the click in the scroll bar."
672 (cons (scroll-bar-scale pair (window-width window)) 0) 671 (cons (scroll-bar-scale pair (window-width window)) 0)
673 (let* ((frame (if (framep window) window (window-frame window))) 672 (let* ((frame (if (framep window) window (window-frame window)))
674 (x (/ (car pair) (frame-char-width frame))) 673 (x (/ (car pair) (frame-char-width frame)))
675 (y (/ (cdr pair) (+ (frame-char-height frame) vspacing)))) 674 (y (/ (cdr pair) (+ (frame-char-height frame)
675 (or vspacing 0)))))
676 (cons x y)))))) 676 (cons x y))))))
677 677
678(defsubst posn-timestamp (position) 678(defsubst posn-timestamp (position)