comparison man/lispref/eval.texi @ 4905:755ae5b97edb

Change "special form" to "special operator" in our sources. Add a compatible function alias, and the relevant manual index entries. src/ChangeLog addition: 2010-01-31 Aidan Kehoe <kehoea@parhasard.net> * symbols.c (Fspecial_operator_p, syms_of_symbols): * eval.c (print_subr, Finteractive_p, Ffuncall) (Ffunction_min_args, Ffunction_max_args, vars_of_eval): * editfns.c: * data.c (Fsubr_max_args): * doc.c (Fbuilt_in_symbol_file): Change "special form" to "special operator" in our sources. man/ChangeLog addition: 2010-01-31 Aidan Kehoe <kehoea@parhasard.net> * xemacs/programs.texi (Defuns): * lispref/variables.texi (Local Variables, Defining Variables) (Setting Variables, Default Value): * lispref/symbols.texi (Definitions): * lispref/searching.texi (Saving Match Data): * lispref/positions.texi (Excursions, Narrowing): * lispref/objects.texi (Primitive Function Type): * lispref/macros.texi (Defining Macros, Backquote): * lispref/lispref.texi (Top): * lispref/intro.texi (A Sample Function Description): * lispref/help.texi (Help Functions): * lispref/functions.texi (What Is a Function, Simple Lambda) (Defining Functions, Calling Functions, Anonymous Functions): * lispref/frames.texi (Input Focus): * lispref/eval.texi (Forms, Function Indirection) (Special Operators, Quoting): * lispref/edebug-inc.texi (Instrumenting) (Specification Examples): * lispref/debugging.texi (Internals of Debugger): * lispref/control.texi (Control Structures, Sequencing): (Conditionals, Combining Conditions, Iteration): (Catch and Throw, Handling Errors): * lispref/commands.texi (Defining Commands, Using Interactive): Terminology change; special operator -> special form. Don't attempt to change this in texinfo.texi or cl.texi, which use macros I don't understand. * lispref/macros.texi (Defining Macros): Give an anonymous macro example here. * lispref/positions.texi (Excursions): Correct some documentation that called a couple of macros special forms. * lispref/searching.texi (Saving Match Data): Drop some documentation of how to write code that works with Emacs 18. * lispref/specifiers.texi (Adding Specifications): Correct this; #'let-specifier is a macro, not a special operator. * lispref/windows.texi (Window Configurations) (Selecting Windows): Correct this, #'save-selected-window and #'save-window-excursion are macros, not special operators. lisp/ChangeLog addition: 2010-01-31 Aidan Kehoe <kehoea@parhasard.net> * obsolete.el: * loadhist.el (symbol-file): * help.el (describe-function-1): * bytecomp.el: (byte-compile-save-current-buffer): * byte-optimize.el (byte-optimize-form-code-walker): * subr.el (subr-arity): Change "special form" to "special operator" in these files, it's the more logical term. * subr.el (special-form-p): Provide this alias for #'special-operator-p.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 31 Jan 2010 20:28:01 +0000
parents 6780963faf78
children 378a34562cbe
comparison
equal deleted inserted replaced
4904:e91e3e353805 4905:755ae5b97edb
250 * Classifying Lists:: How to distinguish various sorts of list forms. 250 * Classifying Lists:: How to distinguish various sorts of list forms.
251 * Function Indirection:: When a symbol appears as the car of a list, 251 * Function Indirection:: When a symbol appears as the car of a list,
252 we find the real function via the symbol. 252 we find the real function via the symbol.
253 * Function Forms:: Forms that call functions. 253 * Function Forms:: Forms that call functions.
254 * Macro Forms:: Forms that call macros. 254 * Macro Forms:: Forms that call macros.
255 * Special Forms:: ``Special forms'' are idiosyncratic primitives, 255 * Special Operators:: ``Special operators'' are idiosyncratic primitives,
256 most of them extremely important. 256 most of them extremely important.
257 Also known as special forms.
257 * Autoloading:: Functions set up to load files 258 * Autoloading:: Functions set up to load files
258 containing their real definitions. 259 containing their real definitions.
259 @end menu 260 @end menu
260 261
261 @node Self-Evaluating Forms 262 @node Self-Evaluating Forms
352 353
353 A form that is a nonempty list is either a function call, a macro 354 A form that is a nonempty list is either a function call, a macro
354 call, or a special form, according to its first element. These three 355 call, or a special form, according to its first element. These three
355 kinds of forms are evaluated in different ways, described below. The 356 kinds of forms are evaluated in different ways, described below. The
356 remaining list elements constitute the @dfn{arguments} for the function, 357 remaining list elements constitute the @dfn{arguments} for the function,
357 macro, or special form. 358 macro, or special operator.
358 359
359 The first step in evaluating a nonempty list is to examine its first 360 The first step in evaluating a nonempty list is to examine its first
360 element. This element alone determines what kind of form the list is 361 element. This element alone determines what kind of form the list is
361 and how the rest of the list is to be processed. The first element is 362 and how the rest of the list is to be processed. The first element is
362 @emph{not} evaluated, as it would be in some Lisp dialects such as 363 @emph{not} evaluated, as it would be in some Lisp dialects such as
385 386
386 @kindex invalid-function 387 @kindex invalid-function
387 @cindex invalid function 388 @cindex invalid function
388 More precisely, we should now have a Lisp function (a lambda 389 More precisely, we should now have a Lisp function (a lambda
389 expression), a byte-code function, a primitive function, a Lisp macro, a 390 expression), a byte-code function, a primitive function, a Lisp macro, a
390 special form, or an autoload object. Each of these types is a case 391 special operator, or an autoload object. Each of these types is a case
391 described in one of the following sections. If the object is not one of 392 described in one of the following sections. If the object is not one of
392 these types, the error @code{invalid-function} is signaled. 393 these types, the error @code{invalid-function} is signaled.
393 394
394 The following example illustrates the symbol indirection process. We 395 The following example illustrates the symbol indirection process. We
395 use @code{fset} to set the function cell of a symbol and 396 use @code{fset} to set the function cell of a symbol and
529 Note that the argument @code{(assq 'handler list)} appears in the 530 Note that the argument @code{(assq 'handler list)} appears in the
530 expansion. 531 expansion.
531 532
532 @xref{Macros}, for a complete description of XEmacs Lisp macros. 533 @xref{Macros}, for a complete description of XEmacs Lisp macros.
533 534
534 @node Special Forms 535 @node Special Operators
535 @subsection Special Forms 536 @subsection Special Operators
536 @cindex special form evaluation 537 @cindex special operator evaluation
537 538 @cindex special form
538 A @dfn{special form} is a primitive function specially marked so that 539
539 its arguments are not all evaluated. Most special forms define control 540 A @dfn{special operator} (historically, and less logically, a
541 @dfn{special form}) is a primitive function specially marked so that
542 its arguments are not all evaluated. Most special operators define control
540 structures or perform variable bindings---things which functions cannot 543 structures or perform variable bindings---things which functions cannot
541 do. 544 do.
542 545
543 Each special form has its own rules for which arguments are evaluated 546 Each special operator has its own rules for which arguments are evaluated
544 and which are used without evaluation. Whether a particular argument is 547 and which are used without evaluation. Whether a particular argument is
545 evaluated may depend on the results of evaluating other arguments. 548 evaluated may depend on the results of evaluating other arguments.
546 549
547 Here is a list, in alphabetical order, of all of the special forms in 550 Here is a list, in alphabetical order, of all of the special operators in
548 XEmacs Lisp with a reference to where each is described. 551 XEmacs Lisp with a reference to where each is described.
549 552
550 @table @code 553 @table @code
551 @item and 554 @item and
552 @pxref{Combining Conditions} 555 @pxref{Combining Conditions}
625 628
626 @item with-output-to-temp-buffer 629 @item with-output-to-temp-buffer
627 @pxref{Temporary Displays} 630 @pxref{Temporary Displays}
628 @end table 631 @end table
629 632
630 @cindex CL note---special forms compared 633 @cindex CL note---special operators compared
631 @quotation 634 @quotation
632 @b{Common Lisp note:} here are some comparisons of special forms in 635 @b{Common Lisp note:} here are some comparisons of special operators in
633 XEmacs Lisp and Common Lisp. @code{setq}, @code{if}, and 636 XEmacs Lisp and Common Lisp. @code{setq}, @code{if}, and
634 @code{catch} are special forms in both XEmacs Lisp and Common Lisp. 637 @code{catch} are special operators in both XEmacs Lisp and Common Lisp.
635 @code{defun} is a special form in XEmacs Lisp, but a macro in Common 638 @code{defun} is a special operator in XEmacs Lisp, but a macro in Common
636 Lisp. @code{save-excursion} is a special form in XEmacs Lisp, but 639 Lisp. @code{save-excursion} is a special operator in XEmacs Lisp, but
637 doesn't exist in Common Lisp. @code{throw} is a special form in 640 doesn't exist in Common Lisp. @code{throw} is a special operator in
638 Common Lisp (because it must be able to throw multiple values), but it 641 both Common Lisp and XEmacs Lisp (because it must be able to throw
639 is a function in XEmacs Lisp (which doesn't have multiple 642 multiple values).@refill
640 values).@refill
641 @end quotation 643 @end quotation
642 644
643 @node Autoloading 645 @node Autoloading
644 @subsection Autoloading 646 @subsection Autoloading
645 647
652 654
653 @node Quoting 655 @node Quoting
654 @section Quoting 656 @section Quoting
655 @cindex quoting 657 @cindex quoting
656 658
657 The special form @code{quote} returns its single argument, as written, 659 The special operator @code{quote} returns its single argument, as written,
658 without evaluating it. This provides a way to include constant symbols 660 without evaluating it. This provides a way to include constant symbols
659 and lists, which are not self-evaluating objects, in a program. (It is 661 and lists, which are not self-evaluating objects, in a program. (It is
660 not necessary to quote self-evaluating objects such as numbers, strings, 662 not necessary to quote self-evaluating objects such as numbers, strings,
661 and vectors.) 663 and vectors.)
662 664
663 @defspec quote object 665 @defspec quote object
664 This special form returns @var{object}, without evaluating it. 666 This special operator returns @var{object}, without evaluating it.
665 @end defspec 667 @end defspec
666 668
667 @cindex @samp{'} for quoting 669 @cindex @samp{'} for quoting
668 @cindex quoting using apostrophe 670 @cindex quoting using apostrophe
669 @cindex apostrophe for quoting 671 @cindex apostrophe for quoting