A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.gnu.org/software/emacs/manual/html_node/elisp/Variables-with-Restricted-Values.html below:

Variables with Restricted Values (GNU Emacs Lisp Reference Manual)

Next: Generalized Variables, Previous: Variable Aliases, Up: Variables   [Contents][Index]

12.16 Variables with Restricted Values

Ordinary Lisp variables can be assigned any value that is a valid Lisp object. However, certain Lisp variables are not defined in Lisp, but in C. Most of these variables are defined in the C code using DEFVAR_LISP. Like variables defined in Lisp, these can take on any value. However, some variables are defined using DEFVAR_INT or DEFVAR_BOOL. See Writing Emacs Primitives, in particular the description of functions of the type syms_of_filename, for a brief discussion of the C implementation.

Variables of type DEFVAR_BOOL can only take on the values nil or t. Attempting to assign them any other value will set them to t:

(let ((display-hourglass 5))
  display-hourglass)
     ⇒ t
Variable: byte-boolean-vars

This variable holds a list of all variables of type DEFVAR_BOOL.

Variables of type DEFVAR_INT can take on only integer values. Attempting to assign them any other value will result in an error:

(setq undo-limit 1000.0)
error→ Wrong type argument: integerp, 1000.0

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4