* [MAC_OSX] [PATCH] Paths setting for bundle
@ 2003-04-11 20:03 Vincent LADEUIL
0 siblings, 0 replies; only message in thread
From: Vincent LADEUIL @ 2003-04-11 20:03 UTC (permalink / raw)
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 <v.ladeuil@free.fr>
* 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-11 20:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-11 20:03 [MAC_OSX] [PATCH] Paths setting for bundle Vincent LADEUIL
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.