X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=man%2Fcl.texi;h=7e8125a4bf8fb20d310746236cbd941d80be3ea4;hp=f7607c921c4163c9044c8c97aa0cf252407d3905;hb=803ca50f0eebcb65e10572cf2af4483902c12e22;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921 diff --git a/man/cl.texi b/man/cl.texi index f7607c9..7e8125a 100644 --- a/man/cl.texi +++ b/man/cl.texi @@ -7,6 +7,11 @@ @end iftex @ifinfo +@dircategory XEmacs Editor +@direntry +* Common Lisp: (cl). GNU Emacs Common Lisp emulation package. +@end direntry + This file documents the GNU Emacs Common Lisp emulation package. Copyright (C) 1993 Free Software Foundation, Inc. @@ -290,10 +295,10 @@ the Emacs name: @example defun* defsubst* defmacro* function* -member* assoc* rassoc* get* -remove* delete* mapcar* sort* -floor* ceiling* truncate* round* -mod* rem* random* +member* assoc* rassoc* remove* +delete* mapcar* sort* floor* +ceiling* truncate* round* mod* +rem* random* @end example Internal function and variable names in the package are prefixed @@ -1068,7 +1073,7 @@ exactly equivalent to @code{(setq x y)}, and @code{setq} itself is strictly speaking redundant now that @code{setf} exists. Many programmers continue to prefer @code{setq} for setting simple variables, though, purely for stylistic or historical reasons. -The macro @code{(setf x y)} actually expands to @code{(setq x y)}, +The form @code{(setf x y)} actually expands to @code{(setq x y)}, so there is no performance penalty for using it in compiled code. @item @@ -1079,8 +1084,8 @@ car cdr caar .. cddddr nth rest first .. tenth aref elt nthcdr symbol-function symbol-value symbol-plist -get get* getf -gethash subseq +get getf gethash +subseq @end smallexample @noindent @@ -3213,8 +3218,8 @@ Emacs 19. @example (declaim (inline foo bar)) (eval-when (compile load eval) (proclaim '(inline foo bar))) -(proclaim-inline foo bar) ; XEmacs only -(defsubst foo (...) ...) ; instead of defun; Emacs 19 only +(proclaim-inline foo bar) ; XEmacs only +(defsubst foo (...) ...) ; instead of defun; Emacs 19 only @end example @strong{Please note:} This declaration remains in effect after the @@ -3292,7 +3297,7 @@ This package defines several symbol-related features that were missing from Emacs Lisp. @menu -* Property Lists:: `get*', `remprop', `getf', `remf' +* Property Lists:: `getf', `remf' * Creating Symbols:: `gensym', `gentemp' @end menu @@ -3301,31 +3306,9 @@ missing from Emacs Lisp. @noindent These functions augment the standard Emacs Lisp functions @code{get} -and @code{put} for operating on properties attached to symbols. +and @code{put} for operating on properties attached to objects. There are also functions for working with property lists as -first-class data structures not attached to particular symbols. - -@defun get* symbol property &optional default -This function is like @code{get}, except that if the property is -not found, the @var{default} argument provides the return value. -(The Emacs Lisp @code{get} function always uses @code{nil} as -the default; this package's @code{get*} is equivalent to Common -Lisp's @code{get}.) - -The @code{get*} function is @code{setf}-able; when used in this -fashion, the @var{default} argument is allowed but ignored. -@end defun - -@defun remprop symbol property -This function removes the entry for @var{property} from the property -list of @var{symbol}. It returns a true value if the property was -indeed found and removed, or @code{nil} if there was no such property. -(This function was probably omitted from Emacs originally because, -since @code{get} did not allow a @var{default}, it was very difficult -to distinguish between a missing property and a property whose value -was @code{nil}; thus, setting a property to @code{nil} was close -enough to @code{remprop} for most purposes.) -@end defun +first-class data structures not attached to particular objects. @defun getf place property &optional default This function scans the list @var{place} as if it were a property @@ -3352,11 +3335,11 @@ pair onto the list if the property is not yet present. (put sym prop val) @equiv{} (setf (getf (symbol-plist sym) prop) val) @end example -The @code{get} and @code{get*} functions are also @code{setf}-able. -The fact that @code{default} is ignored can sometimes be useful: +The @code{get} function is also @code{setf}-able. The fact that +@code{default} is ignored can sometimes be useful: @example -(incf (get* 'foo 'usage-count 0)) +(incf (get 'foo 'usage-count 0)) @end example Here, symbol @code{foo}'s @code{usage-count} property is incremented @@ -4598,7 +4581,7 @@ This is equivalent to @code{(nconc (mapcar* 'cons @var{keys} @var{values}) @noindent Hash tables are now implemented directly in the C code and documented in -@ref{Hash Tables,,, lispref, XEmacs Lisp Programmer's Manual}. +@ref{Hash Tables,,, lispref, XEmacs Lisp Reference Manual}. @ignore A @dfn{hash table} is a data structure that maps ``keys'' onto @@ -4648,7 +4631,7 @@ corresponding value is changed to the stored value. If @var{key} does not already exist, a new entry is added to the table and the table is reallocated to a larger size if necessary. The @var{default} argument is allowed but ignored in this case. The situation is -exactly analogous to that of @code{get*}; @pxref{Property Lists}. +exactly analogous to that of @code{get}; @pxref{Property Lists}. @end defun @defun remhash key table @@ -5116,20 +5099,19 @@ will also include all non-constant arguments of the top-level (assert (> x 10) t "x is too small: %d") @end example -This usage of @var{show-args} is an extension to Common Lisp. In +This usage of @var{show-args} is a change to Common Lisp. In true Common Lisp, the second argument gives a list of @var{places} which can be @code{setf}'d by the user before continuing from the -error. Since Emacs Lisp does not support continuable errors, it -makes no sense to specify @var{places}. +error. @end defspec -@defspec check-type form type [string] -This form verifies that @var{form} evaluates to a value of type +@defspec check-type place type &optional string +This form verifies that @var{place} evaluates to a value of type @var{type}. If so, it returns @code{nil}. If not, @code{check-type} -signals a @code{wrong-type-argument} error. The default error message -lists the erroneous value along with @var{type} and @var{form} -themselves. If @var{string} is specified, it is included in the -error message in place of @var{type}. For example: +signals a continuable @code{wrong-type-argument} error. The default +error message lists the erroneous value along with @var{type} and +@var{place} themselves. If @var{string} is specified, it is included in +the error message in place of @var{type}. For example: @example (check-type x (integer 1 *) "a positive integer") @@ -5138,10 +5120,10 @@ error message in place of @var{type}. For example: @xref{Type Predicates}, for a description of the type specifiers that may be used for @var{type}. -Note that in Common Lisp, the first argument to @code{check-type} -must be a @var{place} suitable for use by @code{setf}, because -@code{check-type} signals a continuable error that allows the -user to modify @var{place}. +Note that as in Common Lisp, the first argument to @code{check-type} +should be a @var{place} suitable for use by @code{setf}, because +@code{check-type} signals a continuable error that allows the user to +modify @var{place}, most simply by returning a value from the debugger. @end defspec The following error-related macro is also defined: @@ -5566,8 +5548,8 @@ referring to the name of a function. In Emacs Lisp, it works just as well to use a regular quote: @example -(loop for x in y by #'cddr collect (mapcar #'plusp x)) ; Common Lisp -(loop for x in y by 'cddr collect (mapcar 'plusp x)) ; Emacs Lisp +(loop for x in y by #'cddr collect (mapcar #'plusp x)) ; Common Lisp +(loop for x in y by 'cddr collect (mapcar 'plusp x)) ; Emacs Lisp @end example When @code{#'} introduces a @code{lambda} form, it is best to