Mercurial > emacs
diff lisp/subr.el @ 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 | 0a0aa7fbe2ca |
children | c00190a8c8ef 376148b31b5e |
line wrap: on
line diff
--- 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.