XEmacs 21.2.29 "Hestia".
[chise/xemacs-chise.git-] / info / lispref.info-7
index b24b1a9..2e16da4 100644 (file)
@@ -853,17 +853,17 @@ File: lispref.info,  Node: Symbol Properties,  Prev: Creating Symbols,  Up: Symb
 Symbol Properties
 =================
 
-   A "property list" ("plist" for short) is a list of paired elements
-stored in the property list cell of a symbol.  Each of the pairs
+   A "property list" ("plist" for short) is a list of paired elements,
+often stored in the property list cell of a symbol.  Each of the pairs
 associates a property name (usually a symbol) with a property or value.
 Property lists are generally used to record information about a
 symbol, such as its documentation as a variable, the name of the file
 where it was defined, or perhaps even the grammatical class of the
 symbol (representing a word) in a language-understanding system.
 
-   Many objects other than symbols can have property lists associated
-with them, and XEmacs provides a full complement of functions for
-working with property lists.  *Note Property Lists::.
+   Some objects which are not symbols also have property lists
+associated with them, and XEmacs provides a full complement of
+functions for working with property lists.  *Note Property Lists::.
 
    The property names and values in a property list can be any Lisp
 objects, but the names are usually symbols.  They are compared using
@@ -879,11 +879,11 @@ the other two elements are the corresponding values.
 
 * Plists and Alists::           Comparison of the advantages of property
                                   lists and association lists.
-* Symbol Plists::               Functions to access symbols' property lists.
+* Object Plists::               Functions to access objects' property lists.
 * Other Plists::                Accessing property lists stored elsewhere.
 
 \1f
-File: lispref.info,  Node: Plists and Alists,  Next: Symbol Plists,  Up: Symbol Properties
+File: lispref.info,  Node: Plists and Alists,  Next: Object Plists,  Up: Symbol Properties
 
 Property Lists and Association Lists
 ------------------------------------
@@ -916,14 +916,22 @@ are pushed on the front of the list and later discarded; this is not
 possible with a property list.
 
 \1f
-File: lispref.info,  Node: Symbol Plists,  Next: Other Plists,  Prev: Plists and Alists,  Up: Symbol Properties
+File: lispref.info,  Node: Object Plists,  Next: Other Plists,  Prev: Plists and Alists,  Up: Symbol Properties
 
-Property List Functions for Symbols
+Property List Functions for Objects
 -----------------------------------
 
+   Once upon a time, only symbols had property lists.  Now, several
+other object types, including strings, extents, faces and glyphs also
+have property lists.
+
  - Function: symbol-plist symbol
      This function returns the property list of SYMBOL.
 
+ - Function: object-plist object
+     This function returns the property list of OBJECT.  If OBJECT is a
+     symbol, this is identical to `symbol-plist'.
+
  - Function: setplist symbol plist
      This function sets SYMBOL's property list to PLIST.  Normally,
      PLIST should be a well-formed property list, but this is not
@@ -937,21 +945,22 @@ Property List Functions for Symbols
      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 (*note
-     Abbrevs::).
+     Abbrevs::).  But generally, its use is discouraged.  Use `put'
+     instead.  `setplist' can only be used with symbols, not other
+     object types.
 
- - Function: get symbol property
+ - Function: get object property &optional default
      This function finds the value of the property named PROPERTY in
-     SYMBOL's property list.  If there is no such property, `nil' is
-     returned.  Thus, there is no distinction between a value of `nil'
-     and the absence of the property.
+     OBJECT's property list.  If there is no such property, `default'
+     (which itself defaults to `nil') is returned.
 
-     The name PROPERTY is compared with the existing property names
-     using `eq', so any object is a legitimate property.
+     PROPERTY is compared with the existing properties using `eq', so
+     any object is a legitimate property.
 
      See `put' for an example.
 
- - Function: put symbol property value
-     This function puts VALUE onto SYMBOL's property list under the
+ - Function: put object property value
+     This function puts VALUE onto OBJECT's property list under the
      property name PROPERTY, replacing any previous property value.
      The `put' function returns VALUE.
 
@@ -961,14 +970,24 @@ Property List Functions for Symbols
                => (a buzzing little bug)
           (get 'fly 'verb)
                => transitive
-          (symbol-plist 'fly)
+          (object-plist 'fly)
                => (verb transitive noun (a buzzing little bug))
 
+ - Function: remprop object property
+     This function removes the entry for PROPERTY from the property
+     list of OBJECT.  It returns `t' if the property was indeed found
+     and removed, or `nil' if there was no such property.  (This
+     function was probably omitted from Emacs originally because, since
+     `get' did not allow a DEFAULT, it was very difficult to
+     distinguish between a missing property and a property whose value
+     was `nil'; thus, setting a property to `nil' was close enough to
+     `remprop' for most purposes.)
+
 \1f
-File: lispref.info,  Node: Other Plists,  Prev: Symbol Plists,  Up: Symbol Properties
+File: lispref.info,  Node: Other Plists,  Prev: Object Plists,  Up: Symbol Properties
 
-Property Lists Outside Symbols
-------------------------------
+Property Lists Not Associated with Objects
+------------------------------------------
 
    These functions are useful for manipulating property lists that are
 stored in places other than symbols:
@@ -1245,40 +1264,3 @@ starting with "all other types" which are self-evaluating forms.
 * Autoloading::             Functions set up to load files
                               containing their real definitions.
 
-\1f
-File: lispref.info,  Node: Self-Evaluating Forms,  Next: Symbol Forms,  Up: Forms
-
-Self-Evaluating Forms
----------------------
-
-   A "self-evaluating form" is any form that is not a list or symbol.
-Self-evaluating forms evaluate to themselves: the result of evaluation
-is the same object that was evaluated.  Thus, the number 25 evaluates to
-25, and the string `"foo"' evaluates to the string `"foo"'.  Likewise,
-evaluation of a vector does not cause evaluation of the elements of the
-vector--it returns the same vector with its contents unchanged.
-
-     '123               ; An object, shown without evaluation.
-          => 123
-     123                ; Evaluated as usual--result is the same.
-          => 123
-     (eval '123)        ; Evaluated "by hand"--result is the same.
-          => 123
-     (eval (eval '123)) ; Evaluating twice changes nothing.
-          => 123
-
-   It is common to write numbers, characters, strings, and even vectors
-in Lisp code, taking advantage of the fact that they self-evaluate.
-However, it is quite unusual to do this for types that lack a read
-syntax, because there's no way to write them textually.  It is possible
-to construct Lisp expressions containing these types by means of a Lisp
-program.  Here is an example:
-
-     ;; Build an expression containing a buffer object.
-     (setq buffer (list 'print (current-buffer)))
-          => (print #<buffer eval.texi>)
-     ;; Evaluate it.
-     (eval buffer)
-          -| #<buffer eval.texi>
-          => #<buffer eval.texi>
-