[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MAC_OSX] [PATCH] Paths setting for bundle
From: |
Vincent LADEUIL |
Subject: |
[MAC_OSX] [PATCH] Paths setting for bundle |
Date: |
11 Apr 2003 22:03:37 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
The following patch solve a weird side-effect regarding access to
files embedded in a bundle : as installation paths cannot be
determined at build time, init_mac_osx_environment elegantly use
environment variables to restore simple access.
The weird part is : these variables are inherited by child
processes, when this child is a different version of emacs to be
debugged, wrong paths are obtained.
2003-04-11 Vincent LADEUIL <address@hidden>
* emacs.c (main): Under MAC_OSX, avoid polluting
environment of child processes with variables related to
bundle paths.
Index: src/emacs.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/emacs.c,v
retrieving revision 1.325
diff -u -r1.325 emacs.c
--- src/emacs.c 18 Dec 2002 06:16:28 -0000 1.325
+++ src/emacs.c 11 Apr 2003 19:41:10 -0000
@@ -1381,11 +1381,6 @@
init_ntproc (); /* must precede init_editfns. */
#endif
-#ifdef HAVE_CARBON
- if (initialized)
- init_mac_osx_environment ();
-#endif
-
/* egetenv is a pretty low-level facility, which may get called in
many circumstances; it seems flimsy to put off initializing it
until calling init_callproc. */
@@ -1398,6 +1393,16 @@
putenv ("LANG=C");
#endif
+#ifdef HAVE_CARBON
+ /* init_mac_osx_environment will use environment variables to
+ * setup various emacs paths iff installed as a bundle. By
+ * setting environment variables *AFTER* calling
+ * set_process_environment (above), we avoid polluting child
+ * processes */
+ if (initialized)
+ init_mac_osx_environment ();
+#endif
+
init_buffer (); /* Init default directory of main buffer. */
init_callproc_1 (); /* Must precede init_cmdargs and init_sys_modes. */
This is my first contribution, feel free to educate me if I've
made something wrong,
Vincent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [MAC_OSX] [PATCH] Paths setting for bundle,
Vincent LADEUIL <=