diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c index ecd4b4b7ea7..82e050d2605 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -83,7 +83,7 @@ Lisp_Object Qtext_read_only; | |||
| 83 | Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp; | 83 | Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp; |
| 84 | Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; | 84 | Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; |
| 85 | Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; | 85 | Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; |
| 86 | Lisp_Object Qbuffer_or_string_p; | 86 | Lisp_Object Qbuffer_or_string_p, Qkeywordp; |
| 87 | Lisp_Object Qboundp, Qfboundp; | 87 | Lisp_Object Qboundp, Qfboundp; |
| 88 | Lisp_Object Qchar_table_p, Qvector_or_char_table_p; | 88 | Lisp_Object Qchar_table_p, Qvector_or_char_table_p; |
| 89 | 89 | ||
| @@ -311,6 +311,22 @@ DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, | |||
| 311 | return Qnil; | 311 | return Qnil; |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | /* Define this in C to avoid unnecessarily consing up the symbol | ||
| 315 | name. */ | ||
| 316 | DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0, | ||
| 317 | "Return t if OBJECT is a keyword.\n\ | ||
| 318 | This means that it is a symbol with a print name beginning with `:'\n\ | ||
| 319 | interned in the initial obarray.") | ||
| 320 | (object) | ||
| 321 | Lisp_Object object; | ||
| 322 | { | ||
| 323 | if (SYMBOLP (object) | ||
| 324 | && XSYMBOL (object)->name->data[0] == ':' | ||
| 325 | && EQ (XSYMBOL (object)->obarray, initial_obarray)) | ||
| 326 | return Qt; | ||
| 327 | return Qnil; | ||
| 328 | } | ||
| 329 | |||
| 314 | DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, | 330 | DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, |
| 315 | "Return t if OBJECT is a vector.") | 331 | "Return t if OBJECT is a vector.") |
| 316 | (object) | 332 | (object) |
| @@ -2593,6 +2609,7 @@ syms_of_data () | |||
| 2593 | Qlistp = intern ("listp"); | 2609 | Qlistp = intern ("listp"); |
| 2594 | Qconsp = intern ("consp"); | 2610 | Qconsp = intern ("consp"); |
| 2595 | Qsymbolp = intern ("symbolp"); | 2611 | Qsymbolp = intern ("symbolp"); |
| 2612 | Qkeywordp = intern ("keywordp"); | ||
| 2596 | Qintegerp = intern ("integerp"); | 2613 | Qintegerp = intern ("integerp"); |
| 2597 | Qnatnump = intern ("natnump"); | 2614 | Qnatnump = intern ("natnump"); |
| 2598 | Qwholenump = intern ("wholenump"); | 2615 | Qwholenump = intern ("wholenump"); |
| @@ -2790,6 +2807,7 @@ syms_of_data () | |||
| 2790 | staticpro (&Qlistp); | 2807 | staticpro (&Qlistp); |
| 2791 | staticpro (&Qconsp); | 2808 | staticpro (&Qconsp); |
| 2792 | staticpro (&Qsymbolp); | 2809 | staticpro (&Qsymbolp); |
| 2810 | staticpro (&Qkeywordp); | ||
| 2793 | staticpro (&Qintegerp); | 2811 | staticpro (&Qintegerp); |
| 2794 | staticpro (&Qnatnump); | 2812 | staticpro (&Qnatnump); |
| 2795 | staticpro (&Qwholenump); | 2813 | staticpro (&Qwholenump); |
| @@ -2876,6 +2894,7 @@ A keyword symbol is a symbol whose name starts with a colon (`:')."); | |||
| 2876 | #endif /* LISP_FLOAT_TYPE */ | 2894 | #endif /* LISP_FLOAT_TYPE */ |
| 2877 | defsubr (&Snatnump); | 2895 | defsubr (&Snatnump); |
| 2878 | defsubr (&Ssymbolp); | 2896 | defsubr (&Ssymbolp); |
| 2897 | defsubr (&Skeywordp); | ||
| 2879 | defsubr (&Sstringp); | 2898 | defsubr (&Sstringp); |
| 2880 | defsubr (&Smultibyte_string_p); | 2899 | defsubr (&Smultibyte_string_p); |
| 2881 | defsubr (&Svectorp); | 2900 | defsubr (&Svectorp); |