# HG changeset patch # User Aidan Kehoe # Date 1198010847 -3600 # Node ID cdc2f70d43199e6f413f22bfb4484c18c8ef25f1 # Parent 4ba890988caa681f3dfc4cf8fbe23b25df9ec8dc Provide #'special-form-p, for the use of advice.el, perhaps other files. 2007-12-18 Aidan Kehoe * symbols.c (Fspecial_form_p): New. For the use of advice.el, and perhaps other files; is SUBR a special form? diff -r 4ba890988caa -r cdc2f70d4319 src/ChangeLog --- a/src/ChangeLog Tue Dec 18 21:28:12 2007 +0100 +++ b/src/ChangeLog Tue Dec 18 21:47:27 2007 +0100 @@ -1,3 +1,9 @@ +2007-12-18 Aidan Kehoe + + * symbols.c (Fspecial_form_p): New. + For the use of advice.el, and perhaps other files; is SUBR a + special form? + 2007-12-17 Aidan Kehoe * doprnt.c (emacs_doprnt_1): diff -r 4ba890988caa -r cdc2f70d4319 src/symbols.c --- a/src/symbols.c Tue Dec 18 21:28:12 2007 +0100 +++ b/src/symbols.c Tue Dec 18 21:47:27 2007 +0100 @@ -732,6 +732,17 @@ return make_string ((const Ibyte *)name, strlen (name)); } +DEFUN ("special-form-p", Fspecial_form_p, 1, 1, 0, /* +Return whether SUBR is a special form. SUBR must be built-in. +*/ + (subr)) +{ + subr = indirect_function (subr, 1); + CHECK_SUBR (subr); + + return XSUBR (subr)->max_args == UNEVALLED ? Qt : Qnil; +} + DEFUN ("setplist", Fsetplist, 2, 2, 0, /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */ @@ -3719,6 +3730,7 @@ DEFSUBR (Fdefine_function); Ffset (intern ("defalias"), intern ("define-function")); DEFSUBR (Fsubr_name); + DEFSUBR (Fspecial_form_p); DEFSUBR (Fsetplist); DEFSUBR (Fsymbol_value_in_buffer); DEFSUBR (Fsymbol_value_in_console);