www.delorie.com/gnu/docs/elisp-manual-21/elisp_140.html   search  
 
Buy the book!


GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.2 Variables that Never Change

In Emacs Lisp, certain symbols normally evaluate to themselves. These include nil and t, as well as any symbol whose name starts with `:' (these are called keywords). These symbols cannot be rebound, nor can their values be changed. Any attempt to set or bind nil or t signals a setting-constant error. The same is true for a keyword (a symbol whose name starts with `:'), if it is interned in the standard obarray, except that setting such a symbol to itself is not an error.

 
nil == 'nil
     => nil
(setq nil 500)
error--> Attempt to set constant symbol: nil

Function: keywordp object
function returns t if object is a symbol whose name starts with `:', interned in the standard obarray, and returns nil otherwise.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003