From: Eli Zaretskii Date: Sat, 14 Sep 2013 09:24:34 +0000 (+0300) Subject: Fix bug #15375 with inaccurate docs of display margin width values. X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/0df00f5905b75a5a0601c8696f41c8796c3d1baa?hp=d3fc65499a4bf85799eee7996128cd74fea17cce Fix bug #15375 with inaccurate docs of display margin width values. doc/lispref/display.texi (Display Margins): State the units of measuring margin width. src/buffer.c (syms_of_buffer) : Doc fix. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b37fa4e64f..a1503ea4dd 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2013-09-14 Eli Zaretskii + + * display.texi (Display Margins): State the units of measuring + margin width. (Bug#15375) + 2013-09-13 Eli Zaretskii * text.texi (Not Intervals): Minor wording fix. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ff9d98170d..2e7d4f4c01 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index cc8704da2a..8df160e119 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-09-14 Eli Zaretskii + + * buffer.c (syms_of_buffer) : + Doc fix. (Bug#15375) + 2013-09-13 Dmitry Antipov Unify Fx_focus_frame between all ports. diff --git a/src/buffer.c b/src/buffer.c index 0bcb608dbd..3d7468904f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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