11 SXEmacs Specific Style
This section was lifted almost word for word from the XEmacs
CODING-STANDARDS by Ben Wing.
Specially-prefixed functions/variables:
- All global C variables whose value is constant and is a symbol begin
with a capital Q, e.g. Qkey_press_event. (The type will always be
Lisp_Object.)
- All other global C variables whose value is a Lisp_Object (this
includes variables that forward into Lisp variables plus others like
Vselected_console) begin with a capital V.
- No C variables whose value is other than a Lisp_Object should begin
with a capital V. (This includes C variables that forward into
integer or boolean Lisp variables.)
All global C variables whose value is a struct Lisp_Subr begin with a
capital S. (This only occurs in connection with DEFUN ()).
- All C functions that are Lisp primitives begin with a capital F,
and no others should begin this way.
Functions for manipulating Lisp types:
- Any function that creates an empty or mostly empty Lisp object
should begin allocate_(). (*Not* make_().) (Except, of course,
for Lisp primitives, which usually begin Fmake_()).
- Any function that converts a pointer into an equivalent Lisp_Object
should begin make_().
- Any function that converts a Lisp_Object into its equivalent pointer
and checks the type and validity of the object (e.g. making sure
it’s not dead) should begin decode_().
- Any function that looks up a Lisp object (e.g. buffer, face) given
a symbol or string should begin get_(). (Except, of course, for
Lisp primitives, which usually begin Fget_()).
Other:
Any header-file declarations of the sort
go into the types section of lisp.h.