-This is ../info/lispref.info, produced by makeinfo version 3.12s from
+This is ../info/lispref.info, produced by makeinfo version 4.0 from
lispref/lispref.texi.
INFO-DIR-SECTION XEmacs Editor
- Function: bitp object
This function returns `t' if OBJECT is either 0 or 1.
- - Function: bit-vector &rest objects
+ - Function: bit-vector &rest bits
This function creates and returns a bit vector whose elements are
- the arguments OBJECTS. The elements must be either of the two
- integers 0 or 1.
+ the arguments BITS. Each argument must be a bit, i.e. one of the
+ two integers 0 or 1.
(bit-vector 0 0 0 1 0 0 0 0 1 0)
=> #*0001000010
(bit-vector)
=> #*
- - Function: make-bit-vector length object
+ - Function: make-bit-vector length bit
This function creates and returns a bit vector consisting of
- LENGTH elements, each initialized to OBJECT.
+ LENGTH elements, each initialized to BIT, which must be one of the
+ two integers 0 or 1.
(setq picket-fence (make-bit-vector 9 1))
=> #*111111111
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
* 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
------------------------------------
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
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.
=> (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:
(getf '(foo 4) 'foo)
=> 4
- - Function: putf plist property value
+ - Macro: putf plist property value
This stores VALUE as the value of the PROPERTY property in the
property list PLIST. It may modify PLIST destructively, or it may
construct a new list structure without altering the old. The
* 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>
-