This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Suggestion: new snarf macro set


Hello,

I'd like to suggest the following set of new snarf macros
(maybe there are better names):

Rename with docstring extension:

SCM_DEFINE            -> SCM_DEFINE_PROCEDURE
SCM_DEFINE1           -> SCM_DEFINE_R_PREDICATE (for scm_tc7_rpsubr)
                      -> SCM_DEFINE_ACCUMULATION (for scm_tc7_asubr)
SCM_GPROC             -> SCM_DEFINE_GENERIC_PROCEDURE
SCM_GPROC1            -> SCM_DEFINE_GENERIC_R_PREDICATE (for scm_tc7_rpsubr)
                      -> SCM_DEFINE_GENERIC_ACCUMULATION (for scm_tc7_asubr)
                      -> SCM_DEFINE_GENERIC_C_FUNCALL (for scm_tc7_cxr)
SCM_SYNTAX            -> SCM_DEFINE_SYNTAX
SCM_GLOBAL_VCELL_INIT -> SCM_DEFINE_VARIABLE
SCM_VCELL_INIT        -> SCM_DEFINE_LOCAL_VARIABLE

Rename without docstring:

SCM_REGISTER_PROC     -> SCM_MAKE_PROCEDURE_ALIAS
SCM_GLOBAL_SYMBOL     -> SCM_MAKE_SYMBOL
SCM_SYMBOL            -> SCM_MAKE_LOCAL_SYMBOL
SCM_GLOBAL_KEYWORD    -> SCM_MAKE_KEYWORD
SCM_KEYWORD           -> SCM_MAKE_LOCAL_KEYWORD

Removal:

SCM_GLOBAL_VCELL      We can use SCM_DEFINE_VARIABLE instead.
SCM_VCELL             Ditto but use SCM_DEFINE_LOCAL_VARIABLE.
SCM_CONST_LONG        This is used only in tag.c.

New macros:

SCM_C_VARIABLE        Similar to SCM_DEFINE_VARIABLE but available only in C.
SCM_C_LOCAL_VARABLE   Ditto but local.

Primitive macros:

SCM_HERE              -> SCM_SNARF_HERE
SCM_INIT              -> SCM_SNARF_INIT
SCM_DOCS              -> SCM_SNARF_DOCS


I can work on this change if permitted.  I can also write elisp commands
that help people insert these macros.  Old macros may be moved to a new
file compat.h or obsolete.h all together.  

Thanks,
Keisuke Nishida

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]