X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=info%2Flispref.info-7;h=fb875ac92ce592faf254c7bb399487aea82ac240;hb=dda61a5a3d1f0f3ffe6e0509c14565233ab999bd;hp=b24b1a9b475abe5dad09306f3c352aaf3e2f495f;hpb=afa9772e3fcbb4e80e3e4cfd1a40b4fccc6d08b8;p=chise%2Fxemacs-chise.git- diff --git a/info/lispref.info-7 b/info/lispref.info-7 index b24b1a9..fb875ac 100644 --- a/info/lispref.info-7 +++ b/info/lispref.info-7 @@ -1,4 +1,4 @@ -This is ../info/lispref.info, produced by makeinfo version 4.0 from +This is ../info/lispref.info, produced by makeinfo version 4.0b from lispref/lispref.texi. INFO-DIR-SECTION XEmacs Editor @@ -471,19 +471,20 @@ Functions That Operate on Bit Vectors - 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 @@ -627,17 +628,17 @@ the symbol `buffer-file-name': Because this symbol is the variable which holds the name of the file being visited in the current buffer, the value cell contents we see are -the name of the source file of this chapter of the XEmacs Lisp Manual. -The property list cell contains the list `(variable-documentation -29529)' which tells the documentation functions where to find the -documentation string for the variable `buffer-file-name' in the `DOC' -file. (29529 is the offset from the beginning of the `DOC' file to -where that documentation string begins.) The function cell contains -the function for returning the name of the file. `buffer-file-name' -names a primitive function, which has no read syntax and prints in hash -notation (*note Primitive Function Type::). A symbol naming a function -written in Lisp would have a lambda expression (or a byte-code object) -in this cell. +the name of the source file of this chapter of the XEmacs Lisp Reference +Manual. The property list cell contains the list +`(variable-documentation 29529)' which tells the documentation +functions where to find the documentation string for the variable +`buffer-file-name' in the `DOC' file. (29529 is the offset from the +beginning of the `DOC' file to where that documentation string begins.) +The function cell contains the function for returning the name of the +file. `buffer-file-name' names a primitive function, which has no read +syntax and prints in hash notation (*note Primitive Function Type::). A +symbol naming a function written in Lisp would have a lambda expression +(or a byte-code object) in this cell.  File: lispref.info, Node: Definitions, Next: Creating Symbols, Prev: Symbol Components, Up: Symbols @@ -853,17 +854,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 +880,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.  -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 +917,22 @@ are pushed on the front of the list and later discarded; this is not possible with a property list.  -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 +946,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 +971,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.) +  -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: @@ -980,7 +1000,7 @@ 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 @@ -1245,40 +1265,3 @@ starting with "all other types" which are self-evaluating forms. * Autoloading:: Functions set up to load files containing their real definitions. - -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 #) - ;; Evaluate it. - (eval buffer) - -| # - => # -