From 304661b97fa538d62a2ea984db8ced66f5b852b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 4 Sep 2014 18:21:40 +0300 Subject: [PATCH] Fix misleading doc string revealed in bug #18385. lisp/subr.el (posn-actual-col-row): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/subr.el | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e130d05cf6..c716ac8dc0a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-09-04 Eli Zaretskii + + * subr.el (posn-actual-col-row): Doc fix. (Bug#18385) + 2014-09-02 Stefan Monnier * emacs-lisp/package.el (package-generate-description-file): diff --git a/lisp/subr.el b/lisp/subr.el index 089e3efe79c..12704da149b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1149,12 +1149,17 @@ and `event-end' functions." (/ (cdr pair) (+ (frame-char-height frame) spacing)))))))) (defun posn-actual-col-row (position) - "Return the actual column and row in POSITION, measured in characters. -These are the actual row number in the window and character number in that row. + "Return the window row number in POSITION and character number in that row. + Return nil if POSITION does not contain the actual position; in that case -`posn-col-row' can be used to get approximate values. +\`posn-col-row' can be used to get approximate values. POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +and `event-end' functions. + +This function does not account for the width on display, like the +number of visual columns taken by a TAB or image. If you need +the coordinates of POSITION in character units, you should use +\`posn-col-row', not this function." (nth 6 position)) (defsubst posn-timestamp (position) -- 2.39.5