diff options
| author | Geoff Voelker | 1998-10-07 19:47:48 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1998-10-07 19:47:48 +0000 |
| commit | d54abccd47d84658afcdf53dbb0eedfae48db53e (patch) | |
| tree | 1933e1e8955c26cb69e706c2597ca8dc5edece51 /src/w32.c | |
| parent | 1fdd36010321c69806fd266f73db4f9f61b797c8 (diff) | |
| download | emacs-d54abccd47d84658afcdf53dbb0eedfae48db53e.tar.gz emacs-d54abccd47d84658afcdf53dbb0eedfae48db53e.zip | |
(init_ntproc): Check for Windows init file.
(term_ntproc): Do not check for it here.
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 73 |
1 files changed, 37 insertions, 36 deletions
| @@ -3024,40 +3024,44 @@ check_windows_init_file () | |||
| 3024 | it cannot find the Windows installation file. If this file does | 3024 | it cannot find the Windows installation file. If this file does |
| 3025 | not exist in the expected place, tell the user. */ | 3025 | not exist in the expected place, tell the user. */ |
| 3026 | 3026 | ||
| 3027 | if (!noninteractive && !inhibit_window_system) { | 3027 | if (!noninteractive && !inhibit_window_system) |
| 3028 | extern Lisp_Object Vwindow_system, Vload_path; | 3028 | { |
| 3029 | Lisp_Object init_file; | 3029 | extern Lisp_Object Vwindow_system, Vload_path, Qfile_exists_p; |
| 3030 | int fd; | 3030 | Lisp_Object init_file; |
| 3031 | 3031 | int fd; | |
| 3032 | init_file = build_string ("term/w32-win"); | ||
| 3033 | fd = openp (Vload_path, init_file, ".el:.elc", NULL, 0); | ||
| 3034 | if (fd < 0) { | ||
| 3035 | Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil); | ||
| 3036 | char *init_file_name = XSTRING (init_file)->data; | ||
| 3037 | char *load_path = XSTRING (load_path_print)->data; | ||
| 3038 | char *buffer = alloca (1024); | ||
| 3039 | |||
| 3040 | sprintf (buffer, | ||
| 3041 | "The Emacs Windows initialization file \"%s.el\" " | ||
| 3042 | "could not be found in your Emacs installation. " | ||
| 3043 | "Emacs checked the following directories for this file:\n" | ||
| 3044 | "\n%s\n\n" | ||
| 3045 | "When Emacs cannot find this file, it usually means that it " | ||
| 3046 | "was not installed properly, or its distribution file was " | ||
| 3047 | "not unpacked properly.\nSee the README.W32 file in the " | ||
| 3048 | "top-level Emacs directory for more information.", | ||
| 3049 | init_file_name, load_path); | ||
| 3050 | MessageBox (NULL, | ||
| 3051 | buffer, | ||
| 3052 | "Emacs Abort Dialog", | ||
| 3053 | MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); | ||
| 3054 | close (fd); | ||
| 3055 | 3032 | ||
| 3033 | init_file = build_string ("term/w32-win"); | ||
| 3034 | fd = openp (Vload_path, init_file, ".el:.elc", NULL, 0); | ||
| 3035 | if (fd < 0) | ||
| 3036 | { | ||
| 3037 | Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil); | ||
| 3038 | char *init_file_name = XSTRING (init_file)->data; | ||
| 3039 | char *load_path = XSTRING (load_path_print)->data; | ||
| 3040 | char *buffer = alloca (1024); | ||
| 3041 | |||
| 3042 | sprintf (buffer, | ||
| 3043 | "The Emacs Windows initialization file \"%s.el\" " | ||
| 3044 | "could not be found in your Emacs installation. " | ||
| 3045 | "Emacs checked the following directories for this file:\n" | ||
| 3046 | "\n%s\n\n" | ||
| 3047 | "When Emacs cannot find this file, it usually means that it " | ||
| 3048 | "was not installed properly, or its distribution file was " | ||
| 3049 | "not unpacked properly.\nSee the README.W32 file in the " | ||
| 3050 | "top-level Emacs directory for more information.", | ||
| 3051 | init_file_name, load_path); | ||
| 3052 | MessageBox (NULL, | ||
| 3053 | buffer, | ||
| 3054 | "Emacs Abort Dialog", | ||
| 3055 | MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); | ||
| 3056 | /* Use the low-level Emacs abort. */ | 3056 | /* Use the low-level Emacs abort. */ |
| 3057 | #undef abort | 3057 | #undef abort |
| 3058 | abort (); | 3058 | abort (); |
| 3059 | } | ||
| 3060 | else | ||
| 3061 | { | ||
| 3062 | close (fd); | ||
| 3063 | } | ||
| 3059 | } | 3064 | } |
| 3060 | } | ||
| 3061 | } | 3065 | } |
| 3062 | 3066 | ||
| 3063 | void | 3067 | void |
| @@ -3067,12 +3071,6 @@ term_ntproc () | |||
| 3067 | /* shutdown the socket interface if necessary */ | 3071 | /* shutdown the socket interface if necessary */ |
| 3068 | term_winsock (); | 3072 | term_winsock (); |
| 3069 | #endif | 3073 | #endif |
| 3070 | |||
| 3071 | /* Check whether we are shutting down because we cannot find the | ||
| 3072 | Windows initialization file. Do this during shutdown so that | ||
| 3073 | Emacs is initialized as possible, and so that it is out of the | ||
| 3074 | critical startup path. */ | ||
| 3075 | check_windows_init_file (); | ||
| 3076 | } | 3074 | } |
| 3077 | 3075 | ||
| 3078 | void | 3076 | void |
| @@ -3172,6 +3170,9 @@ init_ntproc () | |||
| 3172 | (*drive)++; | 3170 | (*drive)++; |
| 3173 | } | 3171 | } |
| 3174 | } | 3172 | } |
| 3173 | |||
| 3174 | /* Check to see if Emacs has been installed correctly. */ | ||
| 3175 | check_windows_init_file (); | ||
| 3175 | } | 3176 | } |
| 3176 | 3177 | ||
| 3177 | /* end of nt.c */ | 3178 | /* end of nt.c */ |