]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/symbols.texi
Update copyright year to 2015
[gnu-emacs] / doc / lispref / symbols.texi
index d3e5c1f157479581a3b33f445078c171d5ae8cb9..a6545eae7325cc991f86ab2e7725d9724aa58732 100644 (file)
@@ -1,6 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2015 Free Software
+@c Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @node Symbols
 @chapter Symbols
@@ -153,8 +154,8 @@ that cell can hold only one Lisp object at any given time.
 @xref{Macros}.
 
   As previously noted, Emacs Lisp allows the same symbol to be defined
-both as a variable (e.g.@: with @code{defvar}) and as a function or
-macro (e.g.@: with @code{defun}).  Such definitions do not conflict.
+both as a variable (e.g., with @code{defvar}) and as a function or
+macro (e.g., with @code{defun}).  Such definitions do not conflict.
 
   These definition also act as guides for programming tools.  For
 example, the @kbd{C-h f} and @kbd{C-h v} commands create help buffers
@@ -449,6 +450,15 @@ For symbols in special obarrays, which are not used for ordinary
 purposes, it may make sense to use the property list cell in a
 nonstandard fashion; in fact, the abbrev mechanism does so
 (@pxref{Abbrevs}).
+
+You could define @code{put} in terms of @code{setplist} and
+@code{plist-put}, as follows:
+
+@example
+(defun put (symbol prop value)
+  (setplist symbol
+            (plist-put (symbol-plist symbol) prop value)))
+@end example
 @end defun
 
 @defun function-get symbol property
@@ -474,8 +484,8 @@ documentation, for the named function.  @xref{Keys in Documentation}.
 The value, if non-@code{nil}, specifies the number of extra slots in
 the named char-table type.  @xref{Char-Tables}.
 
-@itemx customized-face
-@item face-defface-spec
+@item customized-face
+@itemx face-defface-spec
 @itemx saved-face
 @itemx theme-face
 These properties are used to record a face's standard, saved,
@@ -483,9 +493,9 @@ customized, and themed face specs.  Do not set them directly; they are
 managed by @code{defface} and related functions.  @xref{Defining
 Faces}.
 
-@itemx customized-value
+@item customized-value
 @itemx saved-value
-@item standard-value
+@itemx standard-value
 @itemx theme-value
 These properties are used to record a customizable variable's standard
 value, saved value, customized-but-unsaved value, and themed values.
@@ -498,7 +508,7 @@ command.  @xref{Disabling Commands}.
 
 @item face-documentation
 The value stores the documentation string of the named face.  This is
-normally set automatically by @code{defface}.  @xref{Defining Faces}.
+set automatically by @code{defface}.  @xref{Defining Faces}.
 
 @item history-length
 The value, if non-@code{nil}, specifies the maximum minibuffer history
@@ -529,8 +539,9 @@ deleted from the local value of a hook variable when changing major
 modes.  @xref{Setting Hooks}.
 
 @item pure
-This property is used internally to mark certain named functions for
-byte compiler optimization.  Do not set it.
+If the value is non-@code{nil}, the named function is considered to be
+side-effect free.  Calls with constant arguments can be evaluated at
+compile time.  This may shift run time errors to compile time.
 
 @item risky-local-variable
 If the value is non-@code{nil}, the named variable is considered risky
@@ -554,7 +565,7 @@ side-effects, for determining function safety (@pxref{Function
 Safety}) as well as for byte compiler optimizations.  Do not set it.
 
 @item variable-documentation
-If non-@code{nil}, this specifies the named vaariable's documentation
-string.  This is normally set automatically by @code{defvar} and
-related functions.  @xref{Defining Faces}.
+If non-@code{nil}, this specifies the named variable's documentation
+string.  This is set automatically by @code{defvar} and related
+functions.  @xref{Defining Faces}.
 @end table