changeset 39898:bc20a5e30bfd

(DEFUN, DEFVAR_LISP, ...) [DOC_STRINGS_IN_COMMENTS]: Provide definitions for doc strings in comments.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 13 Oct 2001 20:43:52 +0000
parents 3e6f2f2a0a62
children 34ec3a68775d
files src/lisp.h
diffstat 1 files changed, 46 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Sat Oct 13 20:41:25 2001 +0000
+++ b/src/lisp.h	Sat Oct 13 20:43:52 2001 +0000
@@ -1503,6 +1503,9 @@
 
 #if (!defined (__STDC__) && !defined (PROTOTYPES)) \
     || defined (USE_NONANSI_DEFUN)
+
+#ifdef DOC_STRINGS_IN_COMMENTS
+
 #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc)	\
   Lisp_Object fnname ();						\
   struct Lisp_Subr sname =						\
@@ -1510,8 +1513,30 @@
       fnname, minargs, maxargs, lname, prompt, 0};			\
   Lisp_Object fnname
 
+#else /* not DOC_STRINGS_IN_COMMENTS */
+
+#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, args)	\
+  Lisp_Object fnname ();						\
+  struct Lisp_Subr sname =						\
+    { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),	\
+      fnname, minargs, maxargs, lname, prompt, 0};			\
+  Lisp_Object fnname args
+
+#endif /* not DOC_STRINGS_IN_COMMENTS */
+
 #else
 
+#ifdef DOC_STRINGS_IN_COMMENTS
+
+#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, args)	\
+  Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;				\
+  struct Lisp_Subr sname =						\
+    { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),	\
+      fnname, minargs, maxargs, lname, prompt, 0};			\
+  Lisp_Object fnname args
+
+#else /* not DOC_STRINGS_IN_COMMENTS */
+
 /* This version of DEFUN declares a function prototype with the right
    arguments, so we can catch errors with maxargs at compile-time.  */
 #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc)	\
@@ -1521,6 +1546,8 @@
       fnname, minargs, maxargs, lname, prompt, 0};			\
   Lisp_Object fnname
 
+#endif /* not DOC_STRINGS_IN_COMMENTS */
+
 /* Note that the weird token-substitution semantics of ANSI C makes
    this work for MANY and UNEVALLED.  */
 #define DEFUN_ARGS_MANY		(int, Lisp_Object *)
@@ -1565,6 +1592,21 @@
 /* Macros we use to define forwarded Lisp variables.
    These are used in the syms_of_FILENAME functions.  */
 
+#ifdef DOC_STRINGS_IN_COMMENTS
+
+#define DEFVAR_LISP(lname, vname) defvar_lisp (lname, vname)
+#define DEFVAR_LISP_NOPRO(lname, vname) defvar_lisp_nopro (lname, vname)
+#define DEFVAR_BOOL(lname, vname) defvar_bool (lname, vname)
+#define DEFVAR_INT(lname, vname) defvar_int (lname, vname)
+#define DEFVAR_PER_BUFFER(lname, vname, type)  \
+ defvar_per_buffer (lname, vname, type, 0)
+#define DEFVAR_KBOARD(lname, vname) \
+ defvar_kboard (lname, \
+		(int)((char *)(&current_kboard->vname) \
+		      - (char *)current_kboard))
+
+#else /* not DOC_STRINGS_IN_COMMENTS  */
+
 #define DEFVAR_LISP(lname, vname, doc) defvar_lisp (lname, vname)
 #define DEFVAR_LISP_NOPRO(lname, vname, doc) defvar_lisp_nopro (lname, vname)
 #define DEFVAR_BOOL(lname, vname, doc) defvar_bool (lname, vname)
@@ -1575,6 +1617,10 @@
  defvar_kboard (lname, \
 		(int)((char *)(&current_kboard->vname) \
 		      - (char *)current_kboard))
+
+#endif /* not DOC_STRINGS_IN_COMMENTS */
+
+
 
 /* Structure for recording Lisp call stack for backtrace purposes.  */