From: Eli Zaretskii Date: Sun, 12 Dec 2010 20:45:57 +0000 (+0200) Subject: subr.el (posn-col-row): Evaluate header-line-format in the context of X-Git-Tag: emacs-pretest-23.2.92~60 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39;p=emacs.git subr.el (posn-col-row): Evaluate header-line-format in the context of the POSITION window's buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3191718bcfc..bd5d5576867 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-12 Eli Zaretskii + + * subr.el (posn-col-row): Evaluate header-line-format in the + context of the POSITION window's buffer. + 2010-12-11 Glenn Morris * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) diff --git a/lisp/subr.el b/lisp/subr.el index c0f65897f29..e4be7df50c7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -958,7 +958,9 @@ and `event-end' functions." (setq spacing 0))) (cons (/ (car pair) (frame-char-width frame)) (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) - (if (null header-line-format) 0 1)))))))) + (if (null (with-current-buffer (window-buffer window) + header-line-format)) + 0 1)))))))) (defun posn-actual-col-row (position) "Return the actual column and row in POSITION, measured in characters.