diff src/eval.c @ 3794:73288faa5759

[xemacs-hg @ 2007-01-20 16:57:05 by aidan] Fill out docstrings fo `function,' `quote' and `require.'
author aidan
date Sat, 20 Jan 2007 16:57:06 +0000
parents 91950589598c
children 1c2a46ea1f78
line wrap: on
line diff
--- a/src/eval.c	Fri Jan 19 22:51:02 2007 +0000
+++ b/src/eval.c	Sat Jan 20 16:57:06 2007 +0000
@@ -1177,6 +1177,15 @@
 
 DEFUN ("quote", Fquote, 1, UNEVALLED, 0, /*
 Return the argument, without evaluating it.  `(quote x)' yields `x'.
+
+There is an alternative and more used reader syntax for `quote'.  Precede
+any Lisp object with a single apostrophe, and that Lisp object will be
+returned unevaluated. 'x is thus equivalent to (quote x).
+
+Do not use `quote' or the single apostrophe for lambda expressions that you
+would prefer to be byte-compiled.  Use `function', which see, or take
+advantage of the fact that lambda expressions are self-quoting and such
+lambda expressions will be automatically byte-compiled.
 */
        (args))
 {
@@ -1185,8 +1194,16 @@
 
 DEFUN ("function", Ffunction, 1, UNEVALLED, 0, /*
 Like `quote', but preferred for objects which are functions.
-In byte compilation, `function' causes its argument to be compiled.
-`quote' cannot do that.
+
+As with `quote' there is an alternative reader syntax for `function' which
+in practice is used more often.  Writing #'OBJECT is equivalent to writing
+\(function OBJECT), where OBJECT is some Lisp object.
+
+In byte compilation, `function' causes a lambda expression argument to be
+compiled.  `quote' cannot do that.  lambda expressions are, however,
+self-quoting, and self-quoted lambda expressions will be byte-compiled.
+Only lambda expressions explicitly quoted with `quote' or that occur in
+nested data lists will not be byte-compiled.
 */
        (args))
 {