mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 01:41:01 -08:00
(init_ntproc): Check for Windows init file.
(term_ntproc): Do not check for it here.
This commit is contained in:
parent
1fdd360103
commit
d54abccd47
1 changed files with 36 additions and 35 deletions
71
src/w32.c
71
src/w32.c
|
|
@ -3024,40 +3024,44 @@ check_windows_init_file ()
|
|||
it cannot find the Windows installation file. If this file does
|
||||
not exist in the expected place, tell the user. */
|
||||
|
||||
if (!noninteractive && !inhibit_window_system) {
|
||||
extern Lisp_Object Vwindow_system, Vload_path;
|
||||
Lisp_Object init_file;
|
||||
int fd;
|
||||
if (!noninteractive && !inhibit_window_system)
|
||||
{
|
||||
extern Lisp_Object Vwindow_system, Vload_path, Qfile_exists_p;
|
||||
Lisp_Object init_file;
|
||||
int fd;
|
||||
|
||||
init_file = build_string ("term/w32-win");
|
||||
fd = openp (Vload_path, init_file, ".el:.elc", NULL, 0);
|
||||
if (fd < 0) {
|
||||
Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
|
||||
char *init_file_name = XSTRING (init_file)->data;
|
||||
char *load_path = XSTRING (load_path_print)->data;
|
||||
char *buffer = alloca (1024);
|
||||
|
||||
sprintf (buffer,
|
||||
"The Emacs Windows initialization file \"%s.el\" "
|
||||
"could not be found in your Emacs installation. "
|
||||
"Emacs checked the following directories for this file:\n"
|
||||
"\n%s\n\n"
|
||||
"When Emacs cannot find this file, it usually means that it "
|
||||
"was not installed properly, or its distribution file was "
|
||||
"not unpacked properly.\nSee the README.W32 file in the "
|
||||
"top-level Emacs directory for more information.",
|
||||
init_file_name, load_path);
|
||||
MessageBox (NULL,
|
||||
buffer,
|
||||
"Emacs Abort Dialog",
|
||||
MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL);
|
||||
close (fd);
|
||||
init_file = build_string ("term/w32-win");
|
||||
fd = openp (Vload_path, init_file, ".el:.elc", NULL, 0);
|
||||
if (fd < 0)
|
||||
{
|
||||
Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
|
||||
char *init_file_name = XSTRING (init_file)->data;
|
||||
char *load_path = XSTRING (load_path_print)->data;
|
||||
char *buffer = alloca (1024);
|
||||
|
||||
sprintf (buffer,
|
||||
"The Emacs Windows initialization file \"%s.el\" "
|
||||
"could not be found in your Emacs installation. "
|
||||
"Emacs checked the following directories for this file:\n"
|
||||
"\n%s\n\n"
|
||||
"When Emacs cannot find this file, it usually means that it "
|
||||
"was not installed properly, or its distribution file was "
|
||||
"not unpacked properly.\nSee the README.W32 file in the "
|
||||
"top-level Emacs directory for more information.",
|
||||
init_file_name, load_path);
|
||||
MessageBox (NULL,
|
||||
buffer,
|
||||
"Emacs Abort Dialog",
|
||||
MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL);
|
||||
/* Use the low-level Emacs abort. */
|
||||
#undef abort
|
||||
abort ();
|
||||
abort ();
|
||||
}
|
||||
else
|
||||
{
|
||||
close (fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3067,12 +3071,6 @@ term_ntproc ()
|
|||
/* shutdown the socket interface if necessary */
|
||||
term_winsock ();
|
||||
#endif
|
||||
|
||||
/* Check whether we are shutting down because we cannot find the
|
||||
Windows initialization file. Do this during shutdown so that
|
||||
Emacs is initialized as possible, and so that it is out of the
|
||||
critical startup path. */
|
||||
check_windows_init_file ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3172,6 +3170,9 @@ init_ntproc ()
|
|||
(*drive)++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check to see if Emacs has been installed correctly. */
|
||||
check_windows_init_file ();
|
||||
}
|
||||
|
||||
/* end of nt.c */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue