Mercurial > hg > xemacs-beta
changeset 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 | 4ba890988caa |
children | c32e4dca0296 |
files | src/ChangeLog src/symbols.c |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@parhasard.net> + + * 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 <kehoea@parhasard.net> * doprnt.c (emacs_doprnt_1):
--- 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);