comparison src/symbols.c @ 4336:cdc2f70d4319

Provide #'special-form-p, for the use of advice.el, perhaps other files. 2007-12-18 Aidan Kehoe <kehoea@parhasard.net> * symbols.c (Fspecial_form_p): New. For the use of advice.el, and perhaps other files; is SUBR a special form?
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 18 Dec 2007 21:47:27 +0100
parents 45671f160bd5
children c32e4dca0296
comparison
equal deleted inserted replaced
4335:4ba890988caa 4336:cdc2f70d4319
728 const char *name; 728 const char *name;
729 CHECK_SUBR (subr); 729 CHECK_SUBR (subr);
730 730
731 name = XSUBR (subr)->name; 731 name = XSUBR (subr)->name;
732 return make_string ((const Ibyte *)name, strlen (name)); 732 return make_string ((const Ibyte *)name, strlen (name));
733 }
734
735 DEFUN ("special-form-p", Fspecial_form_p, 1, 1, 0, /*
736 Return whether SUBR is a special form. SUBR must be built-in.
737 */
738 (subr))
739 {
740 subr = indirect_function (subr, 1);
741 CHECK_SUBR (subr);
742
743 return XSUBR (subr)->max_args == UNEVALLED ? Qt : Qnil;
733 } 744 }
734 745
735 DEFUN ("setplist", Fsetplist, 2, 2, 0, /* 746 DEFUN ("setplist", Fsetplist, 2, 2, 0, /*
736 Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. 747 Set SYMBOL's property list to NEWPLIST, and return NEWPLIST.
737 */ 748 */
3717 DEFSUBR (Ffboundp); 3728 DEFSUBR (Ffboundp);
3718 DEFSUBR (Ffset); 3729 DEFSUBR (Ffset);
3719 DEFSUBR (Fdefine_function); 3730 DEFSUBR (Fdefine_function);
3720 Ffset (intern ("defalias"), intern ("define-function")); 3731 Ffset (intern ("defalias"), intern ("define-function"));
3721 DEFSUBR (Fsubr_name); 3732 DEFSUBR (Fsubr_name);
3733 DEFSUBR (Fspecial_form_p);
3722 DEFSUBR (Fsetplist); 3734 DEFSUBR (Fsetplist);
3723 DEFSUBR (Fsymbol_value_in_buffer); 3735 DEFSUBR (Fsymbol_value_in_buffer);
3724 DEFSUBR (Fsymbol_value_in_console); 3736 DEFSUBR (Fsymbol_value_in_console);
3725 DEFSUBR (Fbuilt_in_variable_type); 3737 DEFSUBR (Fbuilt_in_variable_type);
3726 DEFSUBR (Fsymbol_value); 3738 DEFSUBR (Fsymbol_value);