Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 177:6075d714658b r20-3b15
Import from CVS: tag r20-3b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:51:16 +0200 |
parents | 2d532a89d707 |
children | 9ad43877534d |
comparison
equal
deleted
inserted
replaced
176:6866abce6aaf | 177:6075d714658b |
---|---|
91 /* Version numbers and strings */ | 91 /* Version numbers and strings */ |
92 Lisp_Object Vemacs_major_version; | 92 Lisp_Object Vemacs_major_version; |
93 Lisp_Object Vemacs_minor_version; | 93 Lisp_Object Vemacs_minor_version; |
94 Lisp_Object Vemacs_beta_version; | 94 Lisp_Object Vemacs_beta_version; |
95 Lisp_Object Vxemacs_codename; | 95 Lisp_Object Vxemacs_codename; |
96 | |
97 /* Package directories built in at configure time */ | |
98 Lisp_Object Vpackage_path; | |
96 | 99 |
97 /* The name under which XEmacs was invoked, with any leading directory | 100 /* The name under which XEmacs was invoked, with any leading directory |
98 names discarded. */ | 101 names discarded. */ |
99 Lisp_Object Vinvocation_name; | 102 Lisp_Object Vinvocation_name; |
100 | 103 |
449 return 0; | 452 return 0; |
450 } | 453 } |
451 } | 454 } |
452 | 455 |
453 /* Make stack traces always identify version + configuration */ | 456 /* Make stack traces always identify version + configuration */ |
454 /* C makes this bizarre circumlocution necessary. */ | 457 #define main_1 STACK_TRACE_EYE_CATCHER |
455 #define PASTE_1(x,y) PASTE_2(x,y) | |
456 #define PASTE_2(x,y) x##y | |
457 #define main_1 PASTE_1(main_, CANONICAL_VERSION) | |
458 | 458 |
459 static DOESNT_RETURN | 459 static DOESNT_RETURN |
460 main_1 (int argc, char **argv, char **envp) | 460 main_1 (int argc, char **argv, char **envp) |
461 { | 461 { |
462 char stack_bottom_variable; | 462 char stack_bottom_variable; |
2137 #ifndef SEPCHAR | 2137 #ifndef SEPCHAR |
2138 #define SEPCHAR ':' | 2138 #define SEPCHAR ':' |
2139 #endif | 2139 #endif |
2140 | 2140 |
2141 Lisp_Object | 2141 Lisp_Object |
2142 decode_env_path (CONST char *evarname, CONST char *default_) | 2142 decode_path (CONST char *path) |
2143 { | 2143 { |
2144 REGISTER CONST char *path = 0; | |
2145 REGISTER CONST char *p; | 2144 REGISTER CONST char *p; |
2146 Lisp_Object lpath = Qnil; | 2145 Lisp_Object lpath = Qnil; |
2147 | 2146 |
2148 if (evarname) | 2147 if (!path || !strlen(path)) return Qnil; |
2149 path = (char *) egetenv (evarname); | |
2150 if (!path) | |
2151 path = default_; | |
2152 if (!path) | |
2153 return Qnil; | |
2154 | 2148 |
2155 #if defined (MSDOS) || defined (WIN32) | 2149 #if defined (MSDOS) || defined (WIN32) |
2156 dostounix_filename (path); | 2150 dostounix_filename (path); |
2157 #endif | 2151 #endif |
2158 | 2152 |
2170 break; | 2164 break; |
2171 } | 2165 } |
2172 return Fnreverse (lpath); | 2166 return Fnreverse (lpath); |
2173 } | 2167 } |
2174 | 2168 |
2169 Lisp_Object | |
2170 decode_env_path (CONST char *evarname, CONST char *default_) | |
2171 { | |
2172 REGISTER CONST char *path = 0; | |
2173 if (evarname) | |
2174 path = (char *) egetenv (evarname); | |
2175 if (!path) | |
2176 path = default_; | |
2177 if (!path) | |
2178 return Qnil; | |
2179 else | |
2180 return decode_path(path); | |
2181 } | |
2182 | |
2175 DEFUN ("noninteractive", Fnoninteractive, 0, 0, 0, /* | 2183 DEFUN ("noninteractive", Fnoninteractive, 0, 0, 0, /* |
2176 Non-nil return value means XEmacs is running without interactive terminal. | 2184 Non-nil return value means XEmacs is running without interactive terminal. |
2177 */ | 2185 */ |
2178 ()) | 2186 ()) |
2179 { | 2187 { |
2346 #ifndef XEMACS_CODENAME | 2354 #ifndef XEMACS_CODENAME |
2347 #define XEMACS_CODENAME "Noname" | 2355 #define XEMACS_CODENAME "Noname" |
2348 #endif | 2356 #endif |
2349 Vxemacs_codename = Fpurecopy (build_string (XEMACS_CODENAME)); | 2357 Vxemacs_codename = Fpurecopy (build_string (XEMACS_CODENAME)); |
2350 | 2358 |
2359 DEFVAR_LISP ("package-path", &Vpackage_path /* | |
2360 List of directories configured for package searching. | |
2361 */ ); | |
2362 #ifndef PACKAGE_PATH | |
2363 #define PACKAGE_PATH "/etc/xemacs:~/.xemacs" | |
2364 #endif | |
2365 Vpackage_path = decode_path(PACKAGE_PATH); | |
2366 | |
2351 DEFVAR_BOOL ("noninteractive", &noninteractive1 /* | 2367 DEFVAR_BOOL ("noninteractive", &noninteractive1 /* |
2352 Non-nil means XEmacs is running without interactive terminal. | 2368 Non-nil means XEmacs is running without interactive terminal. |
2353 */ ); | 2369 */ ); |
2354 | 2370 |
2355 DEFVAR_INT ("emacs-priority", &emacs_priority /* | 2371 DEFVAR_INT ("emacs-priority", &emacs_priority /* |