priority; Those functions have their own extern declaration. */
int emacs_priority;
-#ifdef BSD
+#ifdef BSD_PGRPS
/* See sysdep.c. */
extern int inherited_pgroup;
#endif
signal (sig, memory_warning_signal);
malloc_warning ("Operating system warns that virtual memory is running low.\n");
+
+ /* It might be unsafe to call do_auto_save now. */
+ force_auto_save_soon ();
}
#endif
\f
name = Fexpand_file_name (Vinvocation_name, dir);
while (1)
{
- Lisp_Object tem, lisp_exists, lib_src_exists;
+ Lisp_Object tem, lib_src_exists;
Lisp_Object etc_exists, info_exists;
- /* See if dir contains subdirs for use by Emacs. */
- tem = Fexpand_file_name (build_string ("lisp"), dir);
- lisp_exists = Ffile_exists_p (tem);
- if (!NILP (lisp_exists))
+ /* See if dir contains subdirs for use by Emacs.
+ Check for the ones that would exist in a build directory,
+ not including lisp and info. */
+ tem = Fexpand_file_name (build_string ("lib-src"), dir);
+ lib_src_exists = Ffile_exists_p (tem);
+ if (!NILP (lib_src_exists))
{
- tem = Fexpand_file_name (build_string ("lib-src"), dir);
- lib_src_exists = Ffile_exists_p (tem);
- if (!NILP (lib_src_exists))
+ tem = Fexpand_file_name (build_string ("etc"), dir);
+ etc_exists = Ffile_exists_p (tem);
+ if (!NILP (etc_exists))
{
- tem = Fexpand_file_name (build_string ("etc"), dir);
- etc_exists = Ffile_exists_p (tem);
- if (!NILP (etc_exists))
- {
- tem = Fexpand_file_name (build_string ("info"), dir);
- info_exists = Ffile_exists_p (tem);
- if (!NILP (info_exists))
- {
- Vinstallation_directory
- = Ffile_name_as_directory (dir);
- break;
- }
- }
+ Vinstallation_directory
+ = Ffile_name_as_directory (dir);
+ break;
}
}
/* See if dir's parent contains those subdirs. */
- tem = Fexpand_file_name (build_string ("../lisp"), dir);
- lisp_exists = Ffile_exists_p (tem);
- if (!NILP (lisp_exists))
+ tem = Fexpand_file_name (build_string ("../lib-src"), dir);
+ lib_src_exists = Ffile_exists_p (tem);
+ if (!NILP (lib_src_exists))
{
- tem = Fexpand_file_name (build_string ("../lib-src"), dir);
- lib_src_exists = Ffile_exists_p (tem);
- if (!NILP (lib_src_exists))
+ tem = Fexpand_file_name (build_string ("../etc"), dir);
+ etc_exists = Ffile_exists_p (tem);
+ if (!NILP (etc_exists))
{
- tem = Fexpand_file_name (build_string ("../etc"), dir);
- etc_exists = Ffile_exists_p (tem);
- if (!NILP (etc_exists))
- {
- tem = Fexpand_file_name (build_string ("../info"), dir);
- info_exists = Ffile_exists_p (tem);
- if (!NILP (info_exists))
- {
- tem = Fexpand_file_name (build_string (".."), dir);
- Vinstallation_directory
- = Ffile_name_as_directory (tem);
- break;
- }
- }
+ tem = Fexpand_file_name (build_string (".."), dir);
+ Vinstallation_directory
+ = Ffile_name_as_directory (tem);
+ break;
}
}
setuid (getuid ());
#endif /* PRIO_PROCESS */
+#ifdef EXTRA_INITIALIZE
+ EXTRA_INITIALIZE;
+#endif
+
inhibit_window_system = 0;
/* Handle the -t switch, which specifies filename to use as terminal */
"Priority for Emacs to run at.\n\
This value is effective only if set before Emacs is dumped,\n\
and only if the Emacs executable is installed with setuid to permit\n\
-it to change priority. (Emacs sets its uid back to the real uid.)");
+it to change priority. (Emacs sets its uid back to the real uid.)\n\
+Currently, you need to define PRIO_PROCESS in `config.h'\n\
+before you compile Emacs, to enable the code for this feature.");
emacs_priority = 0;
- staticpro (&Vinstallation_directory);
- Vinstallation_directory = Qnil;
+ DEFVAR_LISP ("invocation-name", &Vinvocation_name,
+ "The program name that was used to run Emacs.\n\
+Any directory names are omitted.");
- /* These have already been set, in init_cmdargs, so don't set them here. */
- staticpro (&Vinvocation_name);
- staticpro (&Vinvocation_directory);
+ DEFVAR_LISP ("invocation-directory", &Vinvocation_directory,
+ "The directory in which the Emacs executable was found, to run it.\n\
+The value is nil if that directory's name is not known.");
+
+ DEFVAR_LISP ("installation-directory", &Vinstallation_directory,
+ "A directory within which to look for the `lib-src' and `etc' directories.\n\
+This is non-nil when we can't find those directories in their standard\n\
+installed locations, but we can find them\n\
+near where the Emacs executable was found.");
+ Vinstallation_directory = Qnil;
}