# HG changeset patch # User Eli Zaretskii # Date 1292186757 -7200 # Node ID 9dc65348ace1a9e8c27bf1f9c55db855fe33d415 # Parent 25ce072b5bd9f6e7b233bf7a8efaed699f857402 subr.el (posn-col-row): Evaluate header-line-format in the context of the POSITION window's buffer. diff -r 25ce072b5bd9 -r 9dc65348ace1 lisp/ChangeLog --- a/lisp/ChangeLog Sun Dec 12 22:37:54 2010 +0200 +++ b/lisp/ChangeLog Sun Dec 12 22:45:57 2010 +0200 @@ -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 -r 25ce072b5bd9 -r 9dc65348ace1 lisp/subr.el --- a/lisp/subr.el Sun Dec 12 22:37:54 2010 +0200 +++ b/lisp/subr.el Sun Dec 12 22:45:57 2010 +0200 @@ -958,7 +958,9 @@ (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.