]> code.delx.au - gnu-emacs/blobdiff - lib-src/make-docfile.c
Fix Lua tags when a function name includes '.' or ':'
[gnu-emacs] / lib-src / make-docfile.c
index 741fa4bfa425561b6d1a92c690f741c5d919576a..3d8f34f1a98abe1501ac1aa0cb4c71c5ca17dbfe 100644 (file)
@@ -507,7 +507,7 @@ write_c_args (char *func, char *buf, int minargs, int maxargs)
        {
          if (ident_length == 0)
            {
-             error ("empty arg list for `%s' should be (void), not ()", func);
+             error ("empty arg list for '%s' should be (void), not ()", func);
              continue;
            }
 
@@ -707,12 +707,9 @@ write_globals (void)
                  globals[i].name, globals[i].name);
        }
       else if (globals[i].type == SYMBOL)
-       printf (("DEFINE_LISP_SYMBOL_BEGIN (%s)\n"
-                "#define i%s %d\n"
-                "#define %s builtin_lisp_symbol (i%s)\n"
-                "DEFINE_LISP_SYMBOL_END (%s)\n\n"),
-               globals[i].name, globals[i].name, symnum++,
-               globals[i].name, globals[i].name, globals[i].name);
+       printf (("#define i%s %d\n"
+                "DEFINE_LISP_SYMBOL (%s)\n"),
+               globals[i].name, symnum++, globals[i].name);
       else
        {
          if (globals[i].flags & DEFUN_noreturn)
@@ -729,18 +726,6 @@ write_globals (void)
 
          if (globals[i].flags & DEFUN_const)
            fputs (" ATTRIBUTE_CONST", stdout);
-         else if (strcmp (globals[i].name, "Fnext_read_file_uses_dialog_p")
-                  == 0)
-           {
-             /* It would be nice to have a cleaner way to deal with this
-                special hack.  */
-             fputs (("\n"
-                     "#if ! (defined USE_GTK || defined USE_MOTIF \\\n"
-                     "       || defined HAVE_NS || defined HAVE_NTGUI)\n"
-                     "\tATTRIBUTE_CONST\n"
-                     "#endif\n"),
-                    stdout);
-           }
 
          puts (";");
        }
@@ -752,15 +737,19 @@ write_globals (void)
   puts ("#ifdef DEFINE_SYMBOLS");
   puts ("static char const *const defsym_name[] = {");
   for (int i = 0; i < num_globals; i++)
-    {
-      if (globals[i].type == SYMBOL)
-       printf ("\t\"%s\",\n", globals[i].v.svalue);
-      while (i + 1 < num_globals
-            && strcmp (globals[i].name, globals[i + 1].name) == 0)
-       i++;
-    }
+    if (globals[i].type == SYMBOL)
+      printf ("\t\"%s\",\n", globals[i].v.svalue);
   puts ("};");
   puts ("#endif");
+
+  puts ("#define Qnil builtin_lisp_symbol (0)");
+  puts ("#if DEFINE_NON_NIL_Q_SYMBOL_MACROS");
+  num_symbols = 0;
+  for (int i = 0; i < num_globals; i++)
+    if (globals[i].type == SYMBOL && num_symbols++ != 0)
+      printf ("# define %s builtin_lisp_symbol (%d)\n",
+             globals[i].name, num_symbols - 1);
+  puts ("#endif");
 }
 
 \f
@@ -1174,7 +1163,7 @@ scan_c_stream (FILE *infile)
            }
          else if (defunflag && maxargs == -1 && !saw_usage)
            /* The DOC should provide the usage form.  */
-           fprintf (stderr, "Missing `usage' for function `%s'.\n",
+           fprintf (stderr, "Missing 'usage' for function '%s'.\n",
                     input_buffer);
        }
     }