aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2010-12-12 22:45:57 +0200
committerEli Zaretskii2010-12-12 22:45:57 +0200
commit11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 (patch)
tree09beb0200c6b9515d9bf45223050202425c998f6
parent15579471891efd210b5d9edd29c1374cba98f648 (diff)
downloademacs-11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39.tar.gz
emacs-11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39.zip
subr.el (posn-col-row): Evaluate header-line-format in the context of
the POSITION window's buffer.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/subr.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3191718bcfc..bd5d5576867 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-12-12 Eli Zaretskii <eliz@gnu.org>
2
3 * subr.el (posn-col-row): Evaluate header-line-format in the
4 context of the POSITION window's buffer.
5
12010-12-11 Glenn Morris <rgm@gnu.org> 62010-12-11 Glenn Morris <rgm@gnu.org>
2 7
3 * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) 8 * 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."
958 (setq spacing 0))) 958 (setq spacing 0)))
959 (cons (/ (car pair) (frame-char-width frame)) 959 (cons (/ (car pair) (frame-char-width frame))
960 (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) 960 (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
961 (if (null header-line-format) 0 1)))))))) 961 (if (null (with-current-buffer (window-buffer window)
962 header-line-format))
963 0 1))))))))
962 964
963(defun posn-actual-col-row (position) 965(defun posn-actual-col-row (position)
964 "Return the actual column and row in POSITION, measured in characters. 966 "Return the actual column and row in POSITION, measured in characters.