Merge from gnulib.
[bpt/emacs.git] / src / emacs.c
index 70a0fae..6bdd255 100644 (file)
@@ -1,7 +1,7 @@
 /* Fully extensible Emacs, running on Unix, intended for GNU.
-   Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999,
-                 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-                 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2011
+  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -27,10 +27,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/types.h>
 #include <sys/file.h>
 #include <setjmp.h>
-
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef WINDOWSNT
 #include <fcntl.h>
@@ -91,62 +88,37 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 #endif
 
-/* If you change the following line, remember to update
-   msdos/mainmake.v2 which gleans the Emacs version from it!  */
-static const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
-static const char emacs_version[] = "24.0.50";
+static const char emacs_version[] = VERSION;
+static const char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc.";
 
 /* Make these values available in GDB, which doesn't see macros.  */
 
 #ifdef USE_LSB_TAG
-int gdb_use_lsb = 1;
+int gdb_use_lsb EXTERNALLY_VISIBLE = 1;
 #else
-int gdb_use_lsb = 0;
+int gdb_use_lsb EXTERNALLY_VISIBLE = 0;
 #endif
 #ifndef USE_LISP_UNION_TYPE
-int gdb_use_union = 0;
+int gdb_use_union EXTERNALLY_VISIBLE  = 0;
 #else
-int gdb_use_union = 1;
+int gdb_use_union EXTERNALLY_VISIBLE = 1;
 #endif
-EMACS_INT gdb_valbits = VALBITS;
-EMACS_INT gdb_gctypebits = GCTYPEBITS;
+EMACS_INT gdb_valbits EXTERNALLY_VISIBLE = VALBITS;
+EMACS_INT gdb_gctypebits EXTERNALLY_VISIBLE = GCTYPEBITS;
 #if defined (DATA_SEG_BITS) && ! defined (USE_LSB_TAG)
-EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS;
+EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = DATA_SEG_BITS;
 #else
-EMACS_INT gdb_data_seg_bits = 0;
+EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = 0;
 #endif
-EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG;
-EMACS_INT gdb_array_mark_flag = ARRAY_MARK_FLAG;
+EMACS_INT PVEC_FLAG EXTERNALLY_VISIBLE = PSEUDOVECTOR_FLAG;
+EMACS_INT gdb_array_mark_flag EXTERNALLY_VISIBLE = ARRAY_MARK_FLAG;
 /* GDB might say "No enum type named pvec_type" if we don't have at
    least one symbol with that type, and then xbacktrace could fail.  */
-enum pvec_type gdb_pvec_type = PVEC_TYPE_MASK;
-
-/* Command line args from shell, as list of strings.  */
-Lisp_Object Vcommand_line_args;
-
-/* The name under which Emacs was invoked, with any leading directory
-   names discarded.  */
-Lisp_Object Vinvocation_name;
-
-/* The directory name from which Emacs was invoked.  */
-Lisp_Object Vinvocation_directory;
-
-/* The directory name in which to find subdirs such as lisp and etc.
-   nil means get them only from PATH_LOADSEARCH.  */
-Lisp_Object Vinstallation_directory;
-
-/* The values of `current-time' before and after Emacs initialization.  */
-Lisp_Object Vbefore_init_time, Vafter_init_time;
-
-/* Hook run by `kill-emacs' before it does really anything.  */
-Lisp_Object Vkill_emacs_hook;
+enum pvec_type gdb_pvec_type EXTERNALLY_VISIBLE = PVEC_TYPE_MASK;
 
 /* Empty lisp strings.  To avoid having to build any others.  */
 Lisp_Object empty_unibyte_string, empty_multibyte_string;
 
-/* Search path separator.  */
-Lisp_Object Vpath_separator;
-
 /* Set nonzero after Emacs has started up the first time.
   Prevents reinitialization of the Lisp world and keymaps
   on subsequent starts.  */
@@ -165,40 +137,14 @@ extern int malloc_set_state (void*);
 int malloc_using_checking;
 #endif
 
-/* Variable whose value is symbol giving operating system type.  */
-Lisp_Object Vsystem_type;
-
-/* Variable whose value is string giving configuration built for.  */
-Lisp_Object Vsystem_configuration;
-
-/* Variable whose value is string giving configuration options,
-   for use when reporting bugs.  */
-Lisp_Object Vsystem_configuration_options;
-
 Lisp_Object Qfile_name_handler_alist;
 
-/* Current and previous system locales for messages and time.  */
-Lisp_Object Vsystem_messages_locale;
-Lisp_Object Vprevious_system_messages_locale;
-Lisp_Object Vsystem_time_locale;
-Lisp_Object Vprevious_system_time_locale;
-
-/* Copyright and version info.  The version number may be updated by
-   Lisp code.  */
-Lisp_Object Vemacs_copyright, Vemacs_version;
+Lisp_Object Qrisky_local_variable;
 
-/* Alist of external libraries and files implementing them.  */
-Lisp_Object Vdynamic_library_alist;
-
-/* If non-zero, emacs should not attempt to use a window-specific code,
+/* If non-zero, Emacs should not attempt to use a window-specific code,
    but instead should use the virtual terminal under which it was started.  */
 int inhibit_window_system;
 
-/* If nonzero, set Emacs to run at this priority.  This is also used
-   in child_setup and sys_suspend to make sure subshells run at normal
-   priority; those functions have their own extern declaration.  */
-EMACS_INT emacs_priority;
-
 /* If non-zero, a filter or a sentinel is running.  Tested to save the match
    data on the first attempt to change it inside asynchronous code.  */
 int running_asynch_code;
@@ -223,17 +169,10 @@ static unsigned long heap_bss_diff;
 #define MAX_HEAP_BSS_DIFF (1024*1024)
 
 /* Nonzero means running Emacs without interactive terminal.  */
-
 int noninteractive;
 
-/* Value of Lisp variable `noninteractive'.
-   Normally same as C variable `noninteractive'
-   but nothing terrible happens if user sets this one.  */
-
-int noninteractive1;
-
-/* Nonzero means Emacs was run in --quick mode.  */
-int inhibit_x_resources;
+/* Nonzero means remove site-lisp directories from load-path.  */
+int no_site_lisp;
 
 /* Name for the server started by the daemon.*/
 static char *daemon_name;
@@ -272,9 +211,11 @@ Initialization options:\n\
 --no-init-file, -q          load neither ~/.emacs nor default.el\n\
 --no-shared-memory, -nl     do not use shared memory\n\
 --no-site-file              do not load site-start.el\n\
+--no-site-lisp, -nsl        do not add site-lisp directories to load-path\n\
 --no-splash                 do not display a splash screen on startup\n\
 --no-window-system, -nw     do not communicate with X, ignoring $DISPLAY\n\
---quick, -Q                 equivalent to -q --no-site-file --no-splash\n\
+--quick, -Q                 equivalent to:\n\
+                              -q --no-site-file --no-site-lisp --no-splash\n\
 --script FILE               run FILE as an Emacs Lisp script\n\
 --terminal, -t DEVICE       use DEVICE for terminal I/O\n\
 --user, -u USER             load ~USER/.emacs instead of your own\n\
@@ -307,14 +248,14 @@ Display options:\n\
 --border-color, -bd COLOR       main border color\n\
 --border-width, -bw WIDTH       width of main border\n\
 --color, --color=MODE           override color mode for character terminals;\n\
-                                  MODE defaults to `auto', and can also\n\
-                                  be `never', `auto', `always',\n\
+                                  MODE defaults to `auto', and\n\
+                                  can also be `never', `always',\n\
                                   or a mode name like `ansi8'\n\
 --cursor-color, -cr COLOR       color of the Emacs cursor indicating point\n\
 --font, -fn FONT                default font; must be fixed-width\n\
 --foreground-color, -fg COLOR   window foreground color\n\
 --fullheight, -fh               make the first frame high as the screen\n\
---fullscreen, -fs               make first frame fullscreen\n\
+--fullscreen, -fs               make the first frame fullscreen\n\
 --fullwidth, -fw                make the first frame wide as the screen\n\
 --maximized, -mm                make the first frame maximized\n\
 --geometry, -g GEOMETRY         window geometry\n\
@@ -367,7 +308,7 @@ pthread_t main_thread;
 
 
 /* Handle bus errors, invalid instruction, etc.  */
-SIGTYPE
+void
 fatal_error_signal (int sig)
 {
   SIGNAL_THREAD_CHECK (sig);
@@ -404,7 +345,7 @@ fatal_error_signal (int sig)
 #ifdef SIGDANGER
 
 /* Handler for SIGDANGER.  */
-SIGTYPE
+void
 memory_warning_signal (sig)
      int sig;
 {
@@ -440,7 +381,7 @@ static void
 init_cmdargs (int argc, char **argv, int skip_args)
 {
   register int i;
-  Lisp_Object name, dir, tem;
+  Lisp_Object name, dir, handler;
   int count = SPECPDL_INDEX ();
   Lisp_Object raw_name;
 
@@ -451,8 +392,8 @@ init_cmdargs (int argc, char **argv, int skip_args)
 
   /* Add /: to the front of the name
      if it would otherwise be treated as magic.  */
-  tem = Ffind_file_name_handler (raw_name, Qt);
-  if (! NILP (tem))
+  handler = Ffind_file_name_handler (raw_name, Qt);
+  if (! NILP (handler))
     raw_name = concat2 (build_string ("/:"), raw_name);
 
   Vinvocation_name = Ffile_name_nondirectory (raw_name);
@@ -469,8 +410,8 @@ init_cmdargs (int argc, char **argv, int skip_args)
        {
          /* Add /: to the front of the name
             if it would otherwise be treated as magic.  */
-         tem = Ffind_file_name_handler (found, Qt);
-         if (! NILP (tem))
+         handler = Ffind_file_name_handler (found, Qt);
+         if (! NILP (handler))
            found = concat2 (build_string ("/:"), found);
          Vinvocation_directory = Ffile_name_directory (found);
        }
@@ -605,21 +546,22 @@ static char dump_tz[] = "UtC0";
    Provide dummy definitions to avoid error.
    (We don't have any real constructors or destructors.)  */
 #ifdef __GNUC__
+
+/* Define a dummy function F.  Declare F too, to pacify gcc
+   -Wmissing-prototypes.  */
+#define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {}
+
 #ifndef GCC_CTORS_IN_LIBC
-void __do_global_ctors (void)
-{}
-void __do_global_ctors_aux (void)
-{}
-void __do_global_dtors (void)
-{}
+DEFINE_DUMMY_FUNCTION (__do_global_ctors)
+DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux)
+DEFINE_DUMMY_FUNCTION (__do_global_dtors)
 /* GNU/Linux has a bug in its library; avoid an error.  */
 #ifndef GNU_LINUX
 char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
 #endif
 char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
 #endif /* GCC_CTORS_IN_LIBC */
-void __main (void)
-{}
+DEFINE_DUMMY_FUNCTION (__main)
 #endif /* __GNUC__ */
 #endif /* ORDINARY_LINK */
 
@@ -634,7 +576,8 @@ void __main (void)
    enough information to do it right.  */
 
 static int
-argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr)
+argmatch (char **argv, int argc, const char *sstr, const char *lstr,
+          int minlen, char **valptr, int *skipptr)
 {
   char *p = NULL;
   int arglen;
@@ -811,8 +754,8 @@ main (int argc, char **argv)
            }
          else
            {
-             version = SDATA (tem);
-             copyright = SDATA (tem2);
+             version = SSDATA (tem);
+             copyright = SSDATA (tem2);
            }
        }
       else
@@ -829,13 +772,14 @@ main (int argc, char **argv)
       printf ("see the file named COPYING.\n");
       exit (0);
     }
-  if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args))
-      if (chdir (ch_to_dir) == -1)
-        {
-          fprintf (stderr, "%s: Can't chdir to %s: %s\n",
-                   argv[0], ch_to_dir, strerror (errno));
-          exit (1);
-        }
+
+  if (argmatch (argv, argc, "-chdir", "--chdir", 4, &ch_to_dir, &skip_args))
+    if (chdir (ch_to_dir) == -1)
+      {
+       fprintf (stderr, "%s: Can't chdir to %s: %s\n",
+                argv[0], ch_to_dir, strerror (errno));
+       exit (1);
+      }
 
 
 #ifdef HAVE_PERSONALITY_LINUX32
@@ -966,13 +910,12 @@ main (int argc, char **argv)
          emacs_close (0);
          emacs_close (1);
          result = emacs_open (term, O_RDWR, 0);
-         if (result < 0)
+         if (result < 0 || dup (0) < 0)
            {
              char *errstring = strerror (errno);
              fprintf (stderr, "%s: %s: %s\n", argv[0], term, errstring);
              exit (1);
            }
-         dup (0);
          if (! isatty (0))
            {
              fprintf (stderr, "%s: %s: not a tty\n", argv[0], term);
@@ -1006,7 +949,7 @@ main (int argc, char **argv)
       /* Convert --script to -scriptload, un-skip it, and sort again
         so that it will be handled in proper sequence.  */
       /* FIXME broken for --script=FILE - is that supposed to work?  */
-      argv[skip_args - 1] = "-scriptload";
+      argv[skip_args - 1] = (char *) "-scriptload";
       skip_args -= 2;
       sort_args (argc, argv);
     }
@@ -1344,6 +1287,9 @@ main (int argc, char **argv)
   no_loadup
     = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
 
+  no_site_lisp
+    = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
+
 #ifdef HAVE_NS
   ns_alloc_autorelease_pool();
   if (!noninteractive)
@@ -1351,6 +1297,8 @@ main (int argc, char **argv)
 #ifdef NS_IMPL_COCOA
       if (skip_args < argc)
         {
+         /* FIXME: Do the right thing if getenv returns NULL, or if
+            chdir fails.  */
           if (!strncmp(argv[skip_args], "-psn", 4))
             {
               skip_args += 1;
@@ -1400,7 +1348,7 @@ main (int argc, char **argv)
 
        for (j = 0; j < count_before + 1; j++)
          new[j] = argv[j];
-       new[count_before + 1] = "-d";
+       new[count_before + 1] = (char *) "-d";
        new[count_before + 2] = displayname;
        for (j = count_before + 2; j <argc; j++)
          new[j + 1] = argv[j];
@@ -1410,11 +1358,29 @@ main (int argc, char **argv)
     /* Change --display to -d, when its arg is separate.  */
     else if (displayname != 0 && skip_args > count_before
             && argv[count_before + 1][1] == '-')
-      argv[count_before + 1] = "-d";
+      argv[count_before + 1] = (char *) "-d";
+
+    if (! no_site_lisp)
+      {
+        if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
+            || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
+          no_site_lisp = 1;
+      }
 
     /* Don't actually discard this arg.  */
     skip_args = count_before;
   }
+#else  /* !HAVE_X_WINDOWS */
+  if (! no_site_lisp)
+  {
+    int count_before = skip_args;
+
+    if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
+        || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
+      no_site_lisp = 1;
+
+    skip_args = count_before;
+  }
 #endif
 
   /* argmatch must not be used after here,
@@ -1508,9 +1474,7 @@ main (int argc, char **argv)
       syms_of_doc ();
       syms_of_editfns ();
       syms_of_emacs ();
-#ifdef CLASH_DETECTION
       syms_of_filelock ();
-#endif /* CLASH_DETECTION */
       syms_of_indent ();
       syms_of_insdel ();
       /* syms_of_keymap (); */
@@ -1748,10 +1712,12 @@ const struct standard_args standard_args[] =
   { "-daemon", "--daemon", 99, 0 },
   { "-help", "--help", 90, 0 },
   { "-nl", "--no-loadup", 70, 0 },
+  { "-nsl", "--no-site-lisp", 65, 0 },
   /* -d must come last before the options handled in startup.el.  */
   { "-d", "--display", 60, 1 },
   { "-display", 0, 60, 1 },
   /* Now for the options handled in `command-line' (startup.el).  */
+  /* (Note that to imply -nsl, -Q is partially handled here.)  */
   { "-Q", "--quick", 55, 0 },
   { "-quick", 0, 55, 0 },
   { "-q", "--no-init-file", 50, 0 },
@@ -2006,14 +1972,15 @@ all of which are called before Emacs is actually killed.  */)
   (Lisp_Object arg)
 {
   struct gcpro gcpro1;
+  Lisp_Object hook;
 
   GCPRO1 (arg);
 
   if (feof (stdin))
     arg = Qt;
 
-  if (!NILP (Vrun_hooks))
-    call1 (Vrun_hooks, intern ("kill-emacs-hook"));
+  hook = intern ("kill-emacs-hook");
+  Frun_hooks (1, &hook);
 
   UNGCPRO;
 
@@ -2023,7 +1990,7 @@ all of which are called before Emacs is actually killed.  */)
      kill it because we are exiting Emacs deliberately (not crashing).
      Do it after shut_down_emacs, which does an auto-save.  */
   if (STRINGP (Vauto_save_list_file_name))
-    unlink (SDATA (Vauto_save_list_file_name));
+    unlink (SSDATA (Vauto_save_list_file_name));
 
   exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS);
 }
@@ -2053,10 +2020,8 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff)
 #ifndef DOS_NT
   {
     int pgrp = EMACS_GETPGRP (0);
-
-    int tpgrp;
-    if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1
-       && tpgrp == pgrp)
+    int tpgrp = tcgetpgrp (0);
+    if ((tpgrp != -1) && tpgrp == pgrp)
       {
        reset_all_sys_modes ();
        if (sig && sig != SIGTERM)
@@ -2121,9 +2086,7 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff)
 \f
 #ifndef CANNOT_DUMP
 
-/* FIXME: maybe this should go into header file, config.h seems the
-   only one appropriate. */
-extern int unexec (const char *, const char *);
+#include "unexec.h"
 
 DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0,
        doc: /* Dump current state of Emacs into executable file FILENAME.
@@ -2206,7 +2169,7 @@ You must run Emacs in batch mode in order to dump it.  */)
 #ifdef USE_MMAP_FOR_BUFFERS
   mmap_set_vars (0);
 #endif
-  unexec (SDATA (filename), !NILP (symfile) ? SDATA (symfile) : 0);
+  unexec (SSDATA (filename), !NILP (symfile) ? SSDATA (symfile) : 0);
 #ifdef USE_MMAP_FOR_BUFFERS
   mmap_set_vars (1);
 #endif
@@ -2240,7 +2203,7 @@ synchronize_locale (int category, Lisp_Object *plocale, Lisp_Object desired_loca
     {
       *plocale = desired_locale;
       setlocale (category, (STRINGP (desired_locale)
-                           ? (char *) SDATA (desired_locale)
+                           ? SSDATA (desired_locale)
                            : ""));
     }
 }
@@ -2350,6 +2313,7 @@ from the parent process and its tty file descriptors.  */)
   (void)
 {
   int nfd;
+  int err = 0;
 
   if (!IS_DAEMON)
     error ("This function can only be called if emacs is run as a daemon");
@@ -2362,10 +2326,11 @@ from the parent process and its tty file descriptors.  */)
 
   /* Get rid of stdin, stdout and stderr.  */
   nfd = open ("/dev/null", O_RDWR);
-  dup2 (nfd, 0);
-  dup2 (nfd, 1);
-  dup2 (nfd, 2);
-  close (nfd);
+  err |= nfd < 0;
+  err |= dup2 (nfd, 0) < 0;
+  err |= dup2 (nfd, 1) < 0;
+  err |= dup2 (nfd, 2) < 0;
+  err |= close (nfd) != 0;
 
   /* Closing the pipe will notify the parent that it can exit.
      FIXME: In case some other process inherited the pipe, closing it here
@@ -2374,10 +2339,13 @@ from the parent process and its tty file descriptors.  */)
      Instead, we should probably close the pipe in start-process and
      call-process to make sure the pipe is never inherited by
      subprocesses.  */
-  write (daemon_pipe[1], "\n", 1);
-  close (daemon_pipe[1]);
+  err |= write (daemon_pipe[1], "\n", 1) < 0;
+  err |= close (daemon_pipe[1]) != 0;
   /* Set it to an invalid value so we know we've already run this function.  */
   daemon_pipe[1] = -1;
+
+  if (err)
+    error ("I/O error during daemon initialization");
   return Qt;
 }
 
@@ -2386,6 +2354,8 @@ syms_of_emacs (void)
 {
   Qfile_name_handler_alist = intern_c_string ("file-name-handler-alist");
   staticpro (&Qfile_name_handler_alist);
+  Qrisky_local_variable = intern_c_string ("risky-local-variable");
+  staticpro (&Qrisky_local_variable);
 
 #ifndef CANNOT_DUMP
   defsubr (&Sdump_emacs);
@@ -2398,11 +2368,11 @@ syms_of_emacs (void)
   defsubr (&Sdaemonp);
   defsubr (&Sdaemon_initialized);
 
-  DEFVAR_LISP ("command-line-args", &Vcommand_line_args,
+  DEFVAR_LISP ("command-line-args", Vcommand_line_args,
               doc: /* Args passed by shell to Emacs, as a list of strings.
 Many arguments are deleted from the list as they are processed.  */);
 
-  DEFVAR_LISP ("system-type", &Vsystem_type,
+  DEFVAR_LISP ("system-type", Vsystem_type,
               doc: /* The value is a symbol indicating the type of operating system you are using.
 Special values:
   `gnu'          compiled for a GNU Hurd system.
@@ -2412,24 +2382,25 @@ Special values:
   `ms-dos'       compiled as an MS-DOS application.
   `windows-nt'   compiled as a native W32 application.
   `cygwin'       compiled using the Cygwin library.
-Anything else (in Emacs 23.1, the possibilities are: aix, berkeley-unix,
-hpux, irix, lynxos 3.0.1, usg-unix-v) indicates some sort of Unix system.  */);
+Anything else (in Emacs 24.1, the possibilities are: aix, berkeley-unix,
+hpux, irix, usg-unix-v) indicates some sort of Unix system.  */);
   Vsystem_type = intern_c_string (SYSTEM_TYPE);
+  /* The above values are from SYSTEM_TYPE in include files under src/s.  */
 
-  DEFVAR_LISP ("system-configuration", &Vsystem_configuration,
+  DEFVAR_LISP ("system-configuration", Vsystem_configuration,
               doc: /* Value is string indicating configuration Emacs was built for.
 On MS-Windows, the value reflects the OS flavor and version on which
 Emacs is running.  */);
   Vsystem_configuration = build_string (EMACS_CONFIGURATION);
 
-  DEFVAR_LISP ("system-configuration-options", &Vsystem_configuration_options,
+  DEFVAR_LISP ("system-configuration-options", Vsystem_configuration_options,
               doc: /* String containing the configuration options Emacs was built with.  */);
   Vsystem_configuration_options = build_string (EMACS_CONFIG_OPTIONS);
 
-  DEFVAR_BOOL ("noninteractive", &noninteractive1,
+  DEFVAR_BOOL ("noninteractive", noninteractive1,
               doc: /* Non-nil means Emacs is running without interactive terminal.  */);
 
-  DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook,
+  DEFVAR_LISP ("kill-emacs-hook", Vkill_emacs_hook,
               doc: /* Hook to be run when `kill-emacs' is called.
 Since `kill-emacs' may be invoked when the terminal is disconnected (or
 in other similar situations), functions placed on this hook should not
@@ -2440,16 +2411,7 @@ Before Emacs 24.1, the hook was not run in batch mode, i.e., if
 `noninteractive' was non-nil.  */);
   Vkill_emacs_hook = Qnil;
 
-  DEFVAR_INT ("emacs-priority", &emacs_priority,
-             doc: /* Priority for Emacs to run at.
-This value is effective only if set before Emacs is dumped,
-and only if the Emacs executable is installed with setuid to permit
-it to change priority.  (Emacs sets its uid back to the real uid.)
-Currently, you need to define SET_EMACS_PRIORITY in `config.h'
-before you compile Emacs, to enable the code for this feature.  */);
-  emacs_priority = 0;
-
-  DEFVAR_LISP ("path-separator", &Vpath_separator,
+  DEFVAR_LISP ("path-separator", Vpath_separator,
               doc: /* String containing the character that separates directories in
 search paths, such as PATH and other similar environment variables.  */);
   {
@@ -2457,60 +2419,60 @@ search paths, such as PATH and other similar environment variables.  */);
     Vpath_separator = make_string (&c, 1);
   }
 
-  DEFVAR_LISP ("invocation-name", &Vinvocation_name,
+  DEFVAR_LISP ("invocation-name", Vinvocation_name,
               doc: /* The program name that was used to run Emacs.
 Any directory names are omitted.  */);
 
-  DEFVAR_LISP ("invocation-directory", &Vinvocation_directory,
+  DEFVAR_LISP ("invocation-directory", Vinvocation_directory,
               doc: /* The directory in which the Emacs executable was found, to run it.
 The value is nil if that directory's name is not known.  */);
 
-  DEFVAR_LISP ("installation-directory", &Vinstallation_directory,
+  DEFVAR_LISP ("installation-directory", Vinstallation_directory,
               doc: /* A directory within which to look for the `lib-src' and `etc' directories.
 This is non-nil when we can't find those directories in their standard
 installed locations, but we can find them near where the Emacs executable
 was found.  */);
   Vinstallation_directory = Qnil;
 
-  DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale,
+  DEFVAR_LISP ("system-messages-locale", Vsystem_messages_locale,
               doc: /* System locale for messages.  */);
   Vsystem_messages_locale = Qnil;
 
   DEFVAR_LISP ("previous-system-messages-locale",
-              &Vprevious_system_messages_locale,
+              Vprevious_system_messages_locale,
               doc: /* Most recently used system locale for messages.  */);
   Vprevious_system_messages_locale = Qnil;
 
-  DEFVAR_LISP ("system-time-locale", &Vsystem_time_locale,
+  DEFVAR_LISP ("system-time-locale", Vsystem_time_locale,
               doc: /* System locale for time.  */);
   Vsystem_time_locale = Qnil;
 
-  DEFVAR_LISP ("previous-system-time-locale", &Vprevious_system_time_locale,
+  DEFVAR_LISP ("previous-system-time-locale", Vprevious_system_time_locale,
               doc: /* Most recently used system locale for time.  */);
   Vprevious_system_time_locale = Qnil;
 
-  DEFVAR_LISP ("before-init-time", &Vbefore_init_time,
+  DEFVAR_LISP ("before-init-time", Vbefore_init_time,
               doc: /* Value of `current-time' before Emacs begins initialization.  */);
   Vbefore_init_time = Qnil;
 
-  DEFVAR_LISP ("after-init-time", &Vafter_init_time,
+  DEFVAR_LISP ("after-init-time", Vafter_init_time,
               doc: /* Value of `current-time' after loading the init files.
 This is nil during initialization.  */);
   Vafter_init_time = Qnil;
 
-  DEFVAR_BOOL ("inhibit-x-resources", &inhibit_x_resources,
+  DEFVAR_BOOL ("inhibit-x-resources", inhibit_x_resources,
               doc: /* If non-nil, X resources, Windows Registry settings, and NS defaults are not used.  */);
   inhibit_x_resources = 0;
 
-  DEFVAR_LISP ("emacs-copyright", &Vemacs_copyright,
+  DEFVAR_LISP ("emacs-copyright", Vemacs_copyright,
               doc: /* Short copyright string for this version of Emacs.  */);
   Vemacs_copyright = build_string (emacs_copyright);
 
-  DEFVAR_LISP ("emacs-version", &Vemacs_version,
+  DEFVAR_LISP ("emacs-version", Vemacs_version,
               doc: /* Version numbers of this version of Emacs.  */);
   Vemacs_version = build_string (emacs_version);
 
-  DEFVAR_LISP ("dynamic-library-alist", &Vdynamic_library_alist,
+  DEFVAR_LISP ("dynamic-library-alist", Vdynamic_library_alist,
     doc: /* Alist of dynamic libraries vs external files implementing them.
 Each element is a list (LIBRARY FILE...), where the car is a symbol
 representing a supported external library, and the rest are strings giving
@@ -2531,6 +2493,3 @@ libraries; only those already known by Emacs will be loaded.  */);
   /* Make sure IS_DAEMON starts up as false.  */
   daemon_pipe[1] = 0;
 }
-
-/* arch-tag: 7bfd356a-c720-4612-8ab6-aa4222931c2e
-   (do not change this comment) */