From: Eli Zaretskii <eliz@gnu.org>
Date: Sat, 14 Jun 2014 16:37:15 +0000 (+0300)
Subject: Fix documentation mentioned in bug #17768.
X-Git-Tag: emacs-24.3.92~76
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=859488bf227da300a4d1f90a51222b163165dfae;p=emacs.git

Fix documentation mentioned in bug #17768.

 lisp/subr.el (posn-col-row): Doc fix.

 doc/lispref/commands.texi (Accessing Mouse): Improve the wording of the
 posn-col-row documentation.
---

diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 2b00d9743b7..c20a20409a2 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-14  Eli Zaretskii  <eliz@gnu.org>
+
+	* commands.texi (Accessing Mouse): Improve the wording of the
+	posn-col-row documentation.  (Bug#17768)
+
 2014-06-08  Glenn Morris  <rgm@gnu.org>
 
 	* os.texi (Startup Summary): Small fix for initial-buffer-choice.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 38a6970e6f4..c478b7847d2 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -2049,23 +2049,24 @@ POSITION is assumed to lie in a window text area."
 @defun posn-col-row position
 This function returns a cons cell @code{(@var{col} .  @var{row})},
 containing the estimated column and row corresponding to buffer
-position @var{position}.  The return value is given in units of the
-frame's default character width and height, as computed from the
-@var{x} and @var{y} values corresponding to @var{position}.  (So, if
-the actual characters have non-default sizes, the actual row and
-column may differ from these computed values.)
+position in @var{position}.  The return value is given in units of the
+frame's default character width and default line height (including
+spacing), as computed from the @var{x} and @var{y} values
+corresponding to @var{position}.  (So, if the actual characters have
+non-default sizes, the actual row and column may differ from these
+computed values.)
 
 Note that @var{row} is counted from the top of the text area.  If the
-window possesses a header line (@pxref{Header Lines}), it is
-@emph{not} counted as the first line.
+window given by @var{position} possesses a header line (@pxref{Header
+Lines}), it is @emph{not} included in the @var{row} count.
 @end defun
 
 @defun posn-actual-col-row position
 Return the actual row and column in @var{position}, as a cons cell
 @code{(@var{col} . @var{row})}.  The values are the actual row and
-column numbers in the window.  @xref{Click Events}, for details.  It
-returns @code{nil} if @var{position} does not include actual positions
-values.
+column numbers in the window given by @var{position}.  @xref{Click
+Events}, for details.  The function returns @code{nil} if
+@var{position} does not include actual position values.
 @end defun
 
 @defun posn-string position
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b489b5a50d6..b4c51f7bb23 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-14  Eli Zaretskii  <eliz@gnu.org>
+
+	* subr.el (posn-col-row): Doc fix.  (Bug#17768)
+
 2014-06-14  Juri Linkov  <juri@jurta.org>
 
 	* bindings.el: Put `ascii-character' property on keypad keys
diff --git a/lisp/subr.el b/lisp/subr.el
index c8dcfc8df97..700c072a81b 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1117,7 +1117,7 @@ pixels.  POSITION should be a list of the form returned by
   "Return the nominal column and row in POSITION, measured in characters.
 The column and row values are approximations calculated from the x
 and y coordinates in POSITION and the frame's default character width
-and height.
+and default line height, including spacing.
 For a scroll-bar event, the result column is 0, and the row
 corresponds to the vertical position of the click in the scroll bar.
 POSITION should be a list of the form returned by the `event-start'