changeset 111944:9dc65348ace1

subr.el (posn-col-row): Evaluate header-line-format in the context of the POSITION window's buffer.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 12 Dec 2010 22:45:57 +0200
parents 25ce072b5bd9
children c00190a8c8ef 129f1ae93387
files lisp/ChangeLog lisp/subr.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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  <eliz@gnu.org>
+
+	* subr.el (posn-col-row): Evaluate header-line-format in the
+	context of the POSITION window's buffer.
+
 2010-12-11  Glenn Morris  <rgm@gnu.org>
 
 	* subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1)
--- 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.