comparison 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
comparison
equal deleted inserted replaced
3793:c737b76ac6dc 3794:73288faa5759
1175 return retval; 1175 return retval;
1176 } 1176 }
1177 1177
1178 DEFUN ("quote", Fquote, 1, UNEVALLED, 0, /* 1178 DEFUN ("quote", Fquote, 1, UNEVALLED, 0, /*
1179 Return the argument, without evaluating it. `(quote x)' yields `x'. 1179 Return the argument, without evaluating it. `(quote x)' yields `x'.
1180
1181 There is an alternative and more used reader syntax for `quote'. Precede
1182 any Lisp object with a single apostrophe, and that Lisp object will be
1183 returned unevaluated. 'x is thus equivalent to (quote x).
1184
1185 Do not use `quote' or the single apostrophe for lambda expressions that you
1186 would prefer to be byte-compiled. Use `function', which see, or take
1187 advantage of the fact that lambda expressions are self-quoting and such
1188 lambda expressions will be automatically byte-compiled.
1180 */ 1189 */
1181 (args)) 1190 (args))
1182 { 1191 {
1183 return XCAR (args); 1192 return XCAR (args);
1184 } 1193 }
1185 1194
1186 DEFUN ("function", Ffunction, 1, UNEVALLED, 0, /* 1195 DEFUN ("function", Ffunction, 1, UNEVALLED, 0, /*
1187 Like `quote', but preferred for objects which are functions. 1196 Like `quote', but preferred for objects which are functions.
1188 In byte compilation, `function' causes its argument to be compiled. 1197
1189 `quote' cannot do that. 1198 As with `quote' there is an alternative reader syntax for `function' which
1199 in practice is used more often. Writing #'OBJECT is equivalent to writing
1200 \(function OBJECT), where OBJECT is some Lisp object.
1201
1202 In byte compilation, `function' causes a lambda expression argument to be
1203 compiled. `quote' cannot do that. lambda expressions are, however,
1204 self-quoting, and self-quoted lambda expressions will be byte-compiled.
1205 Only lambda expressions explicitly quoted with `quote' or that occur in
1206 nested data lists will not be byte-compiled.
1190 */ 1207 */
1191 (args)) 1208 (args))
1192 { 1209 {
1193 return XCAR (args); 1210 return XCAR (args);
1194 } 1211 }