Fix bug #15375 with inaccurate docs of display margin width values.
authorEli Zaretskii <eliz@gnu.org>
Sat, 14 Sep 2013 09:24:34 +0000 (12:24 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 14 Sep 2013 09:24:34 +0000 (12:24 +0300)
 doc/lispref/display.texi (Display Margins): State the units of measuring
 margin width.

 src/buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
 Doc fix.

doc/lispref/ChangeLog
doc/lispref/display.texi
src/ChangeLog
src/buffer.c

index b37fa4e..a1503ea 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-14  Eli Zaretskii  <eliz@gnu.org>
+
+       * display.texi (Display Margins): State the units of measuring
+       margin width.  (Bug#15375)
+
 2013-09-13  Eli Zaretskii  <eliz@gnu.org>
 
        * text.texi (Not Intervals): Minor wording fix.
index ff9d981..2e7d4f4 100644 (file)
@@ -4189,13 +4189,15 @@ them a nonzero width.  The usual way to do that is to set these
 variables:
 
 @defvar left-margin-width
-This variable specifies the width of the left margin.
-It is buffer-local in all buffers.
+This variable specifies the width of the left margin, in character
+cell units.  It is buffer-local in all buffers.  A value of @code{nil}
+means no left marginal area.
 @end defvar
 
 @defvar right-margin-width
-This variable specifies the width of the right margin.
-It is buffer-local in all buffers.
+This variable specifies the width of the right margin, in character
+cell units.  It is buffer-local in all buffers.  A value of @code{nil}
+means no right marginal area.
 @end defvar
 
   Setting these variables does not immediately affect the window.  These
@@ -4206,15 +4208,19 @@ Thus, you can make changes take effect by calling
   You can also set the margin widths immediately.
 
 @defun set-window-margins window left &optional right
-This function specifies the margin widths for window @var{window}.
-The argument @var{left} controls the left margin and
-@var{right} controls the right margin (default @code{0}).
+This function specifies the margin widths for window @var{window}, in
+character cell (a.k.a.@: ``column''), units.  The argument @var{left}
+controls the left margin and @var{right} controls the right margin
+(default @code{0}).
 @end defun
 
 @defun window-margins &optional window
-This function returns the left and right margins of @var{window}
-as a cons cell of the form @code{(@var{left} . @var{right})}.
-If @var{window} is @code{nil}, the selected window is used.
+This function returns the width of the left and right margins of
+@var{window} as a cons cell of the form @w{@code{(@var{left}
+. @var{right})}}.  If one of the two marginal areas does not exist,
+its width is returned as @code{nil}; if none of the two margins exist,
+the function returns @code{nil}.  If @var{window} is @code{nil}, the
+selected window is used.
 @end defun
 
 @node Images
index cc8704d..8df160e 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-14  Eli Zaretskii  <eliz@gnu.org>
+
+       * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
+       Doc fix.  (Bug#15375)
+
 2013-09-13  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Unify Fx_focus_frame between all ports.
index 0bcb608..3d74689 100644 (file)
@@ -5900,7 +5900,7 @@ See also the functions `display-table-slot' and `set-display-table-slot'.  */);
 
   DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols),
                     Qintegerp,
-                    doc: /* Width of left marginal area for display of a buffer.
+                    doc: /* Width in columns of left marginal area for display of a buffer.
 A value of nil means no marginal area.
 
 Setting this variable does not take effect until a new buffer is displayed
@@ -5908,7 +5908,7 @@ in a window.  To make the change take effect, call `set-window-buffer'.  */);
 
   DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols),
                     Qintegerp,
-                    doc: /* Width of right marginal area for display of a buffer.
+                    doc: /* Width in columns of right marginal area for display of a buffer.
 A value of nil means no marginal area.
 
 Setting this variable does not take effect until a new buffer is displayed