manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

57.3 Variables

A variable is a Lisp symbol which has a value. The symbol's name is also called the name of the variable. A variable name can contain any characters that can appear in a file, but conventionally variable names consist of words separated by hyphens. A variable can have a documentation string which describes what kind of value it should have and how the value will be used.

Emacs Lisp allows any variable (with a few exceptions) to have any kind of value, but most variables that Emacs uses expect a value of a certain type. Often the value should always be a string, or should always be a number. Sometimes we say that a certain feature is turned on if a variable is “non-nil,” meaning that if the variable's value is nil, the feature is off, but the feature is on for any other value. The conventional value to use to turn on the feature—since you have to pick one particular value when you set the variable—is t.

Emacs uses many Lisp variables for internal record keeping, but the most interesting variables for a non-programmer user are those meant for users to change—these are called user options.

Each user option that you can set with the customization buffer is in fact a Lisp variable. Emacs does not (usually) change the values of these variables on its own; instead, you set the values in order to control the behavior of certain Emacs commands. Use of the customization buffer is explained above (see section Easy Customization Interface); here we describe other aspects of Emacs variables.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.