comparison lisp/subr.el @ 111615:ab9aebf1b099

subr.el (posn-col-row): Pay attention to header line. (Bug#7390)
author Eli Zaretskii <eliz@gnu.org>
date Sat, 13 Nov 2010 23:07:58 +0200
parents d2f5496377e6
children 3655cc4062e4 0d5ab24d31df
comparison
equal deleted inserted replaced
111614:31f67bce5645 111615:ab9aebf1b099
953 (setq spacing (truncate (* spacing 953 (setq spacing (truncate (* spacing
954 (frame-char-height frame))))) 954 (frame-char-height frame)))))
955 ((null spacing) 955 ((null spacing)
956 (setq spacing 0))) 956 (setq spacing 0)))
957 (cons (/ (car pair) (frame-char-width frame)) 957 (cons (/ (car pair) (frame-char-width frame))
958 (/ (cdr pair) (+ (frame-char-height frame) spacing)))))))) 958 (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
959 (if (null header-line-format) 0 1))))))))
959 960
960 (defun posn-actual-col-row (position) 961 (defun posn-actual-col-row (position)
961 "Return the actual column and row in POSITION, measured in characters. 962 "Return the actual column and row in POSITION, measured in characters.
962 These are the actual row number in the window and character number in that row. 963 These are the actual row number in the window and character number in that row.
963 Return nil if POSITION does not contain the actual position; in that case 964 Return nil if POSITION does not contain the actual position; in that case