# $buffer-tab-width(5)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

$buffer-tab-width - Buffer tab character interval

## SYNOPSIS

$buffer-tab-width `integer`; Default is $tab-width(5).

-0 < integer <= n

## DESCRIPTION

$buffer-tab-width defines the width of a tab character in terms of displayable spaces, a tab character is typically 8 spaces. A tab character appearing in a buffer is rendered with up to $buffer-tab-width spaces to take it to the next column boundary of modulo $buffer-tab-width.

Modification of the variable value causes the displayed tab width to change to the new value. The macro tabs-to-spaces(3) may be used to convert all tabs to spaces.

When a buffer is created (file loading or creation) then the default value is taken from the $tab-width(5) variable.

## NOTES

The indentation of a buffer is controlled by the $buffer-indent-width(5) and not the $buffer-tab-width when automatic indent(2) is enabled.

The November 2004 version of MicroEmacs removed the existing variables $tabwidth and $tabsize which were ambiguous. The existing variable scope was global which caused problems when moving to buffers with different tab width properties. The variables have been replaced with $tab-width(5) and $buffer-tab-width. The indentation which was previously controlled by the tab width has been replaced with $indent-width(5) and $buffer-indent-width(5).

## SEE ALSO

$buffer-indent-width(5), $indent-width(5), $tab-width(5), buffer-mode(2), indent(2), tab(2m), tabs-to-spaces(3).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>