Mercurial > hg > xemacs-beta
comparison src/symbols.c @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | abe6d1db359e |
children | 1ccc32a20af4 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
196 } | 196 } |
197 | 197 |
198 DEFUN ("intern", Fintern, 1, 2, 0, /* | 198 DEFUN ("intern", Fintern, 1, 2, 0, /* |
199 Return the canonical symbol whose name is STRING. | 199 Return the canonical symbol whose name is STRING. |
200 If there is none, one is created by this function and returned. | 200 If there is none, one is created by this function and returned. |
201 A second optional argument specifies the obarray to use; | 201 Optional second argument OBARRAY specifies the obarray to use; |
202 it defaults to the value of `obarray'. | 202 it defaults to the value of the variable `obarray'. |
203 */ | 203 */ |
204 (string, obarray)) | 204 (string, obarray)) |
205 { | 205 { |
206 Lisp_Object object, *ptr; | 206 Lisp_Object object, *ptr; |
207 Lisp_Symbol *symbol; | 207 Lisp_Symbol *symbol; |
243 | 243 |
244 DEFUN ("intern-soft", Fintern_soft, 1, 2, 0, /* | 244 DEFUN ("intern-soft", Fintern_soft, 1, 2, 0, /* |
245 Return the canonical symbol named NAME, or nil if none exists. | 245 Return the canonical symbol named NAME, or nil if none exists. |
246 NAME may be a string or a symbol. If it is a symbol, that exact | 246 NAME may be a string or a symbol. If it is a symbol, that exact |
247 symbol is searched for. | 247 symbol is searched for. |
248 A second optional argument specifies the obarray to use; | 248 Optional second argument OBARRAY specifies the obarray to use; |
249 it defaults to the value of `obarray'. | 249 it defaults to the value of the variable `obarray'. |
250 */ | 250 */ |
251 (name, obarray)) | 251 (name, obarray)) |
252 { | 252 { |
253 /* #### Bug! (intern-soft "nil") returns nil. Perhaps we should | 253 /* #### Bug! (intern-soft "nil") returns nil. Perhaps we should |
254 add a DEFAULT-IF-NOT-FOUND arg, like in get. */ | 254 add a DEFAULT-IF-NOT-FOUND arg, like in get. */ |
276 DEFUN ("unintern", Funintern, 1, 2, 0, /* | 276 DEFUN ("unintern", Funintern, 1, 2, 0, /* |
277 Delete the symbol named NAME, if any, from OBARRAY. | 277 Delete the symbol named NAME, if any, from OBARRAY. |
278 The value is t if a symbol was found and deleted, nil otherwise. | 278 The value is t if a symbol was found and deleted, nil otherwise. |
279 NAME may be a string or a symbol. If it is a symbol, that symbol | 279 NAME may be a string or a symbol. If it is a symbol, that symbol |
280 is deleted, if it belongs to OBARRAY--no other symbol is deleted. | 280 is deleted, if it belongs to OBARRAY--no other symbol is deleted. |
281 OBARRAY defaults to the value of the variable `obarray' | 281 OBARRAY defaults to the value of the variable `obarray'. |
282 */ | 282 */ |
283 (name, obarray)) | 283 (name, obarray)) |
284 { | 284 { |
285 Lisp_Object tem; | 285 Lisp_Object tem; |
286 Lisp_String *string; | 286 Lisp_String *string; |
488 | 488 |
489 return 0; | 489 return 0; |
490 } | 490 } |
491 | 491 |
492 DEFUN ("apropos-internal", Fapropos_internal, 1, 2, 0, /* | 492 DEFUN ("apropos-internal", Fapropos_internal, 1, 2, 0, /* |
493 Show all symbols whose names contain match for REGEXP. | 493 Return a list of all symbols whose names contain match for REGEXP. |
494 If optional 2nd arg PREDICATE is non-nil, (funcall PREDICATE SYMBOL) | 494 If optional 2nd arg PREDICATE is non-nil, only symbols for which |
495 is done for each symbol and a symbol is mentioned only if that | 495 \(funcall PREDICATE SYMBOL) returns non-nil are returned. |
496 returns non-nil. | |
497 Return list of symbols found. | |
498 */ | 496 */ |
499 (regexp, predicate)) | 497 (regexp, predicate)) |
500 { | 498 { |
501 struct appropos_mapper_closure closure; | 499 struct appropos_mapper_closure closure; |
502 struct gcpro gcpro1; | 500 struct gcpro gcpro1; |
1929 | 1927 |
1930 return UNBOUNDP (value) ? Fsignal (Qvoid_variable, list1 (symbol)) : value; | 1928 return UNBOUNDP (value) ? Fsignal (Qvoid_variable, list1 (symbol)) : value; |
1931 } | 1929 } |
1932 | 1930 |
1933 DEFUN ("set-default", Fset_default, 2, 2, 0, /* | 1931 DEFUN ("set-default", Fset_default, 2, 2, 0, /* |
1934 Set SYMBOL's default value to VAL. SYMBOL and VAL are evaluated. | 1932 Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. |
1935 The default value is seen in buffers that do not have their own values | 1933 The default value is seen in buffers that do not have their own values |
1936 for this variable. | 1934 for this variable. |
1937 */ | 1935 */ |
1938 (symbol, value)) | 1936 (symbol, value)) |
1939 { | 1937 { |
2595 } | 2593 } |
2596 | 2594 |
2597 | 2595 |
2598 DEFUN ("local-variable-p", Flocal_variable_p, 2, 3, 0, /* | 2596 DEFUN ("local-variable-p", Flocal_variable_p, 2, 3, 0, /* |
2599 Return t if SYMBOL's value is local to BUFFER. | 2597 Return t if SYMBOL's value is local to BUFFER. |
2600 If optional third arg AFTER-SET is true, return t if SYMBOL would be | 2598 If optional third arg AFTER-SET is non-nil, return t if SYMBOL would be |
2601 buffer-local after it is set, regardless of whether it is so presently. | 2599 buffer-local after it is set, regardless of whether it is so presently. |
2602 A nil value for BUFFER is *not* the same as (current-buffer), but means | 2600 A nil value for BUFFER is *not* the same as (current-buffer), but means |
2603 "no buffer". Specifically: | 2601 "no buffer". Specifically: |
2604 | 2602 |
2605 -- If BUFFER is nil and AFTER-SET is nil, a return value of t indicates that | 2603 -- If BUFFER is nil and AFTER-SET is nil, a return value of t indicates that |
3189 } | 3187 } |
3190 | 3188 |
3191 XSYMBOL (Qnil)->function = Qunbound; | 3189 XSYMBOL (Qnil)->function = Qunbound; |
3192 | 3190 |
3193 defsymbol (&Qt, "t"); | 3191 defsymbol (&Qt, "t"); |
3194 XSYMBOL (Qt)->value = Qt; /* Veritas aetera */ | 3192 XSYMBOL (Qt)->value = Qt; /* Veritas aeterna */ |
3195 Vquit_flag = Qnil; | 3193 Vquit_flag = Qnil; |
3196 | 3194 |
3197 pdump_wire (&Qnil); | 3195 pdump_wire (&Qnil); |
3198 pdump_wire (&Qunbound); | 3196 pdump_wire (&Qunbound); |
3199 pdump_wire (&Vquit_flag); | 3197 pdump_wire (&Vquit_flag); |